+ static function fillActivity(Action $action, Activity $act, array &$options)
+ {
+ if (!$act->context instanceof ActivityContext) {
+ $act->context = new ActivityContext();
+ }
+ self::fillOptions($action, $options);
+ if (isset($options['groups'])) {
+ foreach ($options['groups'] as $group_id) {
+ $group = User_group::getByID($group_id);
+ $act->context->attention[$group->getUri()] = $group->getObjectType();
+ }
+ }
+ if (isset($options['replies'])) {
+ foreach ($options['replies'] as $profile_uri) {
+ $profile = Profile::fromUri($profile_uri);
+ $act->context->attention[$profile->getUri()] = $profile->getObjectType();
+ }
+ }
+ }
+