- $act = new Activity();
-
- $act->verb = ActivityVerb::FOLLOW;
-
- $act->id = TagURI::mint('follow:%d:%d:%s',
- $subscriber->id,
- $other->id,
- common_date_iso8601(time()));
-
- $act->time = time();
- $act->title = _("Follow");
- // TRANS: Success message for subscribe to user attempt through OStatus.
- // TRANS: %1$s is the subscriber name, %2$s is the subscribed user's name.
- $act->content = sprintf(_("%1$s is now following %2$s."),
- $subscriber->getBestName(),
- $other->getBestName());
+ $sub = Subscription::pkeyGet(array('subscriber' => $subscriber->id,
+ 'subscribed' => $other->id));