diff options
author | friendica <info@friendica.com> | 2012-11-05 21:05:51 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-11-05 21:05:51 -0800 |
commit | 7d926213c6a5216e713b4aca57b4af5c6633133f (patch) | |
tree | 6d02a58cfb55bb72fbc56850fa9c2547f58062a2 | |
parent | 90e70d96740179594e0ef8ae133934a0bb469319 (diff) | |
download | volse-hubzilla-7d926213c6a5216e713b4aca57b4af5c6633133f.tar.gz volse-hubzilla-7d926213c6a5216e713b4aca57b4af5c6633133f.tar.bz2 volse-hubzilla-7d926213c6a5216e713b4aca57b4af5c6633133f.zip |
fix the profile change activity post
-rw-r--r-- | boot.php | 8 | ||||
-rw-r--r-- | include/activities.php | 38 |
2 files changed, 24 insertions, 22 deletions
@@ -271,8 +271,8 @@ define ( 'NAMESPACE_ATOM1', 'http://www.w3.org/2005/Atom' ); */ define ( 'ACTIVITY_LIKE', NAMESPACE_ACTIVITY_SCHEMA . 'like' ); -define ( 'ACTIVITY_DISLIKE', NAMESPACE_DFRN . '/dislike' ); -define ( 'ACTIVITY_OBJ_HEART', NAMESPACE_DFRN . '/heart' ); +define ( 'ACTIVITY_DISLIKE', NAMESPACE_ZOT . '/activity/dislike' ); +define ( 'ACTIVITY_OBJ_HEART', NAMESPACE_ZOT . '/activity/heart' ); define ( 'ACTIVITY_FRIEND', NAMESPACE_ACTIVITY_SCHEMA . 'make-friend' ); define ( 'ACTIVITY_REQ_FRIEND', NAMESPACE_ACTIVITY_SCHEMA . 'request-friend' ); @@ -297,8 +297,8 @@ define ( 'ACTIVITY_OBJ_P_PHOTO', NAMESPACE_ACTIVITY_SCHEMA . 'profile-photo' ); define ( 'ACTIVITY_OBJ_ALBUM', NAMESPACE_ACTIVITY_SCHEMA . 'photo-album' ); define ( 'ACTIVITY_OBJ_EVENT', NAMESPACE_ACTIVITY_SCHEMA . 'event' ); define ( 'ACTIVITY_OBJ_GROUP', NAMESPACE_ACTIVITY_SCHEMA . 'group' ); -define ( 'ACTIVITY_OBJ_TAGTERM', NAMESPACE_DFRN . '/tagterm' ); -define ( 'ACTIVITY_OBJ_PROFILE', NAMESPACE_DFRN . '/profile' ); +define ( 'ACTIVITY_OBJ_TAGTERM', NAMESPACE_ZOT . '/activity/tagterm' ); +define ( 'ACTIVITY_OBJ_PROFILE', NAMESPACE_ZOT . '/activity/profile' ); /** * item weight for query ordering diff --git a/include/activities.php b/include/activities.php index 1f595e57d..ced9f3d18 100644 --- a/include/activities.php +++ b/include/activities.php @@ -17,15 +17,15 @@ function profile_activity($changed, $value) { return; $arr = array(); - $arr['uri'] = $arr['parent_uri'] = item_message_id(); - $arr['uid'] = local_user(); - $arr['aid'] = $self['channel_account_id']; + $arr['uri'] = $arr['parent_uri'] = item_message_id(); + $arr['uid'] = local_user(); + $arr['aid'] = $self['channel_account_id']; $arr['owner_xchan'] = $arr['author_xchan'] = $self['xchan_hash']; - $arr['item_flags'] = ITEM_WALL|ITEM_ORIGIN|ITEM_THREAD_TOP; - $arr['verb'] = ACTIVITY_UPDATE; - $arr['obj_type'] = ACTIVITY_OBJ_PROFILE; + $arr['item_flags'] = ITEM_WALL|ITEM_ORIGIN|ITEM_THREAD_TOP; + $arr['verb'] = ACTIVITY_UPDATE; + $arr['obj_type'] = ACTIVITY_OBJ_PROFILE; - $A = '[url=' . z_root() . '/profile/' . $self[0]['xchan_addr'] . ']' . $self[0]['xchan_name'] . '[/url]'; + $A = '[url=' . z_root() . '/channel/' . $self['channel_address'] . ']' . $self['channel_name'] . '[/url]'; $changes = ''; @@ -42,11 +42,11 @@ function profile_activity($changed, $value) { $changes .= $ch; } - $prof = '[url=' . z_root() . '/profile/' . $self[0]['xchan_addr'] . ']' . t('public profile') . '[/url]'; + $prof = '[url=' . z_root() . '/profile/' . $self['channel_address'] . ']' . t('public profile') . '[/url]'; if($t == 1 && strlen($value)) { $message = sprintf( t('%1$s changed %2$s to “%3$s”'), $A, $changes, $value); - $message .= "\n\n" . sprintf( t(' - Visit %1$s\'s %2$s'), $A, $prof); + $message .= "\n\n" . sprintf( t('Visit %1$s\'s %2$s'), $A, $prof); } else $message = sprintf( t('%1$s has an updated %2$s, changing %3$s.'), $A, $prof, $changes); @@ -54,22 +54,24 @@ function profile_activity($changed, $value) { $arr['body'] = $message; - $links = array(); - $links[] = array('rel' => 'alternate', 'type' => 'text/html', 'href' => z_root() . '/profile/' . $self[0]['xchan_addr']); - $links[] = array('rel' => 'photo', 'type' => $self[0]['xchan_photo_mimetype'], 'href' => $self[0]['xchan_photo_l']); + $links = array(); + $links[] = array('rel' => 'alternate', 'type' => 'text/html', + 'href' => z_root() . '/profile/' . $self['channel_address']); + $links[] = array('rel' => 'photo', 'type' => $self['xchan_photo_mimetype'], + 'href' => $self['xchan_photo_l']); $arr['object'] = json_encode(array( 'type' => ACTIVITY_OBJ_PROFILE, - 'title' => $self[0]['channel_name'], - 'id' => $self[0]['xchan_url'] . '/' . $self[0]['xchan_hash'], + 'title' => $self['channel_name'], + 'id' => $self['xchan_url'] . '/' . $self['xchan_hash'], 'link' => $links )); - $arr['allow_cid'] = $self[0]['channel_allow_cid']; - $arr['allow_gid'] = $self[0]['channel_allow_gid']; - $arr['deny_cid'] = $self[0]['channel_deny_cid']; - $arr['deny_gid'] = $self[0]['channel_deny_gid']; + $arr['allow_cid'] = $self['channel_allow_cid']; + $arr['allow_gid'] = $self['channel_allow_gid']; + $arr['deny_cid'] = $self['channel_deny_cid']; + $arr['deny_gid'] = $self['channel_deny_gid']; $i = item_store($arr); |