diff options
author | friendica <info@friendica.com> | 2013-07-29 17:30:46 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-07-29 17:30:46 -0700 |
commit | 7b3c29ebe69726f7d42c9327bebb2ea7251bccb4 (patch) | |
tree | eea014afe0989f657768eaf56cacf0f33a6e88df /include | |
parent | 092ef64ac78d7535788ba03b0d940fa311e0934d (diff) | |
download | volse-hubzilla-7b3c29ebe69726f7d42c9327bebb2ea7251bccb4.tar.gz volse-hubzilla-7b3c29ebe69726f7d42c9327bebb2ea7251bccb4.tar.bz2 volse-hubzilla-7b3c29ebe69726f7d42c9327bebb2ea7251bccb4.zip |
fix bug #84, make imported messages from your clones show up on your wall
Diffstat (limited to 'include')
-rwxr-xr-x | include/items.php | 5 | ||||
-rw-r--r-- | include/zot.php | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index bb4bd42e3..b22c02955 100755 --- a/include/items.php +++ b/include/items.php @@ -506,6 +506,11 @@ function get_item_elements($x) { $arr['edited'] = datetime_convert(); $arr['title'] = (($x['title']) ? htmlentities($x['title'], ENT_COMPAT,'UTF-8',false) : ''); + + if(mb_strlen($arr['title']) > 255) + $arr['title'] = mb_substr($arr['title'],0,255); + + $arr['app'] = (($x['app']) ? htmlentities($x['app'], ENT_COMPAT,'UTF-8',false) : ''); $arr['mid'] = (($x['message_id']) ? htmlentities($x['message_id'], ENT_COMPAT,'UTF-8',false) : ''); $arr['parent_mid'] = (($x['message_top']) ? htmlentities($x['message_top'], ENT_COMPAT,'UTF-8',false) : ''); diff --git a/include/zot.php b/include/zot.php index d2bb0842c..c53e6c267 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1033,6 +1033,18 @@ function process_delivery($sender,$arr,$deliveries,$relay) { $perm = (($arr['mid'] == $arr['parent_mid']) ? 'send_stream' : 'post_comments'); + // This is our own post, possibly coming from a channel clone + + if($arr['owner_xchan'] == $d['hash']) { + $arr['item_flags'] = $arr['item_flags'] | ITEM_WALL; + } + else { + // clear the wall flag if it is set + if($arr['item_flags'] & ITEM_WALL) { + $arr['item_flags'] = ($arr['item_flags'] ^ ITEM_WALL); + } + } + if((! perm_is_allowed($channel['channel_id'],$sender['hash'],$perm)) && (! $tag_delivery)) { logger("permission denied for delivery {$channel['channel_id']}"); $result[] = array($d['hash'],'permission denied',$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>'); |