diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-08-27 17:57:59 +0200 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-08-27 17:57:59 +0200 |
commit | 1b82fb7349a7a4048755d92e757efc5dc227b227 (patch) | |
tree | e614f70f830ed518b185f22203f42c91aea36db0 /include/conversation.php | |
parent | 092e7378cdaeefaa7b4a954bd865bba1960f01aa (diff) | |
parent | 7b28c42693ff41da61abe4974c7a0a7412b6d6e5 (diff) | |
download | volse-hubzilla-1b82fb7349a7a4048755d92e757efc5dc227b227.tar.gz volse-hubzilla-1b82fb7349a7a4048755d92e757efc5dc227b227.tar.bz2 volse-hubzilla-1b82fb7349a7a4048755d92e757efc5dc227b227.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php index e58429255..a3fdf39df 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -395,7 +395,9 @@ function count_descendants($item) { * @brief Check if the activity of the item is visible. * * likes (etc.) can apply to other things besides posts. Check if they are post - * children, in which case we handle them specially. + * children, in which case we handle them specially. Activities which are unrecognised + * as having special meaning and hidden will be treated as posts or comments and visible + * in the stream. * * @param array $item * @return boolean @@ -403,12 +405,21 @@ function count_descendants($item) { function visible_activity($item) { $hidden_activities = array(ACTIVITY_LIKE, ACTIVITY_DISLIKE, ACTIVITY_AGREE, ACTIVITY_DISAGREE, ACTIVITY_ABSTAIN, ACTIVITY_ATTEND, ACTIVITY_ATTENDNO, ACTIVITY_ATTENDMAYBE); + $post_types = array(ACTIVITY_OBJ_NOTE,ACTIVITY_OBJ_COMMENT,basename(ACTIVITY_OBJ_NOTE),basename(ACTIVITY_OBJ_COMMENT)); + foreach ($hidden_activities as $act) { if ((activity_match($item['verb'], $act)) && ($item['mid'] != $item['parent_mid'])) { return false; } } + // In order to share edits with networks which have no concept of editing, we'll create + // separate activities to indicate the edit. Our network will not require them, since our + // edits are automatically applied and the activity indicated. + + if(($item['verb'] === ACTIVITY_UPDATE) && (in_array($item['obj_type'],$post_types))) + return false; + return true; } |