]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/actions/usersalmon.php
Debugging log fix.
[quix0rs-gnu-social.git] / plugins / OStatus / actions / usersalmon.php
index 1c4c64efccd322c3a492ed66300bfc8f1eaa79d3..fd7b12317d7a6478133d14789d5f63ebd2506e5a 100644 (file)
@@ -42,15 +42,17 @@ 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);
+                common_debug('Referenced Notice object found with URI: '.$notice->getUri());
             } catch (NoResultException $e) {
+                common_debug('Referenced Notice object NOT found with URI: '.$this->activity->context->replyToID);
                 $notice = false;
             }
         }
 
         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.');