From 8b0721cf3587a48653a126330217fb4bc32c9ffa Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 5 Apr 2014 03:53:04 -0700 Subject: this makes rpost to another channel work somewhat - but there are issues, since the ACL will belong to the wrong channel. Leaving disabled for now. I don't know that we can solve all the issues without a different design so this may end up in a plugin for those who are willing to put up with the shortcomings. --- mod/item.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 86ed4fda8..756d22a39 100644 --- a/mod/item.php +++ b/mod/item.php @@ -168,8 +168,8 @@ function item_post(&$a) { } - $observer = $a->get_observer(); $channel = null; + $observer = null; $dest_channel = ((array_key_exists('dest_channel',$_REQUEST) && intval($_REQUEST['dest_channel'])) ? intval($_REQUEST['dest_channel']) : 0); @@ -183,10 +183,17 @@ function item_post(&$a) { if($r) { $channel = $r[0]; $profile_uid = $dest_channel; + $x = q("select * from xchan where xchan_hash = '%s' limit 1", + dbesc($channel['channel_hash']) + ); + if($x) + $observer = $x[0]; } } + if(! $observer) + $observer = $a->get_observer(); if($parent) { -- cgit v1.2.3