forked from GNUsocial/gnu-social
Use in_array instead. Now we get third party responses to contextually interesting threads
I think this solves much of the "third party conversation" issues, assuming involved parties are using modern GNU social instances.
This commit is contained in:
parent
31c9b2c1d8
commit
e6f07d8554
@ -42,7 +42,7 @@ class UsersalmonAction extends SalmonAction
|
|||||||
|
|
||||||
if (!empty($this->activity->context->replyToID)) {
|
if (!empty($this->activity->context->replyToID)) {
|
||||||
try {
|
try {
|
||||||
$notice = Notice::getKV('uri', $this->activity->context->replyToID);
|
$notice = Notice::getByUri($this->activity->context->replyToID);
|
||||||
} catch (NoResultException $e) {
|
} catch (NoResultException $e) {
|
||||||
$notice = false;
|
$notice = false;
|
||||||
}
|
}
|
||||||
@ -50,7 +50,7 @@ class UsersalmonAction extends SalmonAction
|
|||||||
|
|
||||||
if ($notice instanceof Notice &&
|
if ($notice instanceof Notice &&
|
||||||
($this->target->sameAs($notice->getProfile())
|
($this->target->sameAs($notice->getProfile())
|
||||||
|| array_key_exists($this->target->getID(), $notice->getAttentionProfileIDs())
|
|| in_array($this->target->getID(), $notice->getAttentionProfileIDs())
|
||||||
)) {
|
)) {
|
||||||
// In reply to a notice either from or mentioning this user.
|
// In reply to a notice either from or mentioning this user.
|
||||||
common_debug('User is the owner or was in the attention list of thr:in-reply-to activity.');
|
common_debug('User is the owner or was in the attention list of thr:in-reply-to activity.');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user