aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-04-05 03:53:04 -0700
committerfriendica <info@friendica.com>2014-04-05 03:53:04 -0700
commit8b0721cf3587a48653a126330217fb4bc32c9ffa (patch)
treec43f75ba0a7e83f79256076f88461aadce77b06d /mod
parent4901ef8faf743fd7fef97fc75a1c727804bf3df5 (diff)
downloadvolse-hubzilla-8b0721cf3587a48653a126330217fb4bc32c9ffa.tar.gz
volse-hubzilla-8b0721cf3587a48653a126330217fb4bc32c9ffa.tar.bz2
volse-hubzilla-8b0721cf3587a48653a126330217fb4bc32c9ffa.zip
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.
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php9
1 files changed, 8 insertions, 1 deletions
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) {