Support arbitrary likes - "David likes Bob's bicycle" or "Nancy likes Margaret's breasts" or whatever... This is a tricky activity to construct. You will need to set the object owner to the owner of the "thing" and the object title to the name of the "thing". The thing liked can include a photo if desired. This will probably have issues working correctly in other activitystreams environments.

This commit is contained in:
friendica 2013-06-18 20:30:20 -07:00
parent ba4f237be2
commit 0b935b79dc
2 changed files with 14 additions and 0 deletions

View File

@ -379,6 +379,7 @@ define ( 'ACTIVITY_OBJ_EVENT', NAMESPACE_ACTIVITY_SCHEMA . 'event' );
define ( 'ACTIVITY_OBJ_GROUP', NAMESPACE_ACTIVITY_SCHEMA . 'group' );
define ( 'ACTIVITY_OBJ_TAGTERM', NAMESPACE_ZOT . '/activity/tagterm' );
define ( 'ACTIVITY_OBJ_PROFILE', NAMESPACE_ZOT . '/activity/profile' );
define ( 'ACTIVITY_OBJ_THING', NAMESPACE_ZOT . '/activity/thing' );
/**
* item weight for query ordering

View File

@ -125,6 +125,19 @@ function localize_item(&$item){
$Bphoto = get_rel_link($obj['link'],'photo');
}
break;
case ACTIVITY_OBJ_THING:
$post_type = $obj['title'];
$author_name = (($obj['owner'] && $obj['owner']['name']) ? $obj['owner']['name'] : '');
if($obj['owner'] && $obj['owner']['link'])
$author_link = get_rel_link($obj['owner']['link'],'alternate');
else
$author_link = '';
if($obj['link']) {
$Bphoto = get_rel_link($obj['link'],'photo');
}
break;
case ACTIVITY_OBJ_NOTE:
default:
$post_type = t('status');