X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Factivitymover.php;h=0493750d0877e5b8f8108011027e13b16eda9dc9;hb=5fd6053220d9ff2c28735fcf5b8c99b83b09ecc0;hp=6d9d77b215e08be1a61d3c2ae2b0d2d026bbe7fd;hpb=19b965d99188fde59cdd39b668df8951bc0f180c;p=quix0rs-gnu-social.git diff --git a/lib/activitymover.php b/lib/activitymover.php index 6d9d77b215..0493750d08 100644 --- a/lib/activitymover.php +++ b/lib/activitymover.php @@ -55,7 +55,7 @@ class ActivityMover extends QueueHandler { list ($act, $sink, $userURI, $remoteURI) = $data; - $user = User::staticGet('uri', $userURI); + $user = User::getKV('uri', $userURI); $remote = Profile::fromURI($remoteURI); try { @@ -92,7 +92,7 @@ class ActivityMover extends QueueHandler "{$act->actor->id} to {$remote->nickname}."); // push it, then delete local $sink->postActivity($act); - $notice = Notice::staticGet('uri', $act->objects[0]->id); + $notice = Notice::getKV('uri', $act->objects[0]->id); if (!empty($notice)) { $fave = Fave::pkeyGet(array('user_id' => $user->id, 'notice_id' => $notice->id)); @@ -105,7 +105,7 @@ class ActivityMover extends QueueHandler "{$act->actor->id} to {$remote->nickname}."); // XXX: send a reshare, not a post $sink->postActivity($act); - $notice = Notice::staticGet('uri', $act->objects[0]->id); + $notice = Notice::getKV('uri', $act->objects[0]->id); if (!empty($notice)) { $notice->delete(); } @@ -115,13 +115,13 @@ class ActivityMover extends QueueHandler "Moving group join of {$act->objects[0]->id} by ". "{$act->actor->id} to {$remote->nickname}."); $sink->postActivity($act); - $group = User_group::staticGet('uri', $act->objects[0]->id); + $group = User_group::getKV('uri', $act->objects[0]->id); if (!empty($group)) { $user->leaveGroup($group); } break; case ActivityVerb::FOLLOW: - if ($act->actor->id == $user->uri) { + if ($act->actor->id === $user->getUri()) { $this->log(LOG_INFO, "Moving subscription to {$act->objects[0]->id} by ". "{$act->actor->id} to {$remote->nickname}."); @@ -131,7 +131,7 @@ class ActivityMover extends QueueHandler Subscription::cancel($user->getProfile(), $other); } } else { - $otherUser = User::staticGet('uri', $act->actor->id); + $otherUser = User::getKV('uri', $act->actor->id); if (!empty($otherUser)) { $this->log(LOG_INFO, "Changing sub to {$act->objects[0]->id}".