From: Mikael Nordfeldth Date: Tue, 23 Feb 2016 23:19:27 +0000 (+0100) Subject: Use in_array instead. Now we get third party responses to contextually interesting... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e6f07d8554b41345ed98186375714cca3bbcd452;p=quix0rs-gnu-social.git 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. --- diff --git a/plugins/OStatus/actions/usersalmon.php b/plugins/OStatus/actions/usersalmon.php index 1c4c64efcc..ea5262aa3b 100644 --- a/plugins/OStatus/actions/usersalmon.php +++ b/plugins/OStatus/actions/usersalmon.php @@ -42,7 +42,7 @@ class UsersalmonAction extends SalmonAction if (!empty($this->activity->context->replyToID)) { try { - $notice = Notice::getKV('uri', $this->activity->context->replyToID); + $notice = Notice::getByUri($this->activity->context->replyToID); } catch (NoResultException $e) { $notice = false; } @@ -50,7 +50,7 @@ class UsersalmonAction extends SalmonAction if ($notice instanceof Notice && ($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. common_debug('User is the owner or was in the attention list of thr:in-reply-to activity.');