diff options
Diffstat (limited to 'include/channel.php')
-rw-r--r-- | include/channel.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/channel.php b/include/channel.php index 1a6508803..12b4152ca 100644 --- a/include/channel.php +++ b/include/channel.php @@ -6,6 +6,7 @@ require_once('include/zot.php'); require_once('include/crypto.php'); require_once('include/menu.php'); +require_once('include/perm_upgrade.php'); /** * @brief Called when creating a new channel. @@ -497,7 +498,8 @@ function identity_basic_export($channel_id, $items = false) { intval($channel_id) ); if($r) { - $ret['channel'] = $r[0]; + translate_channel_perms_outbound($r[0]); + $ret['channel'] = $r[0]; $ret['relocate'] = [ 'channel_address' => $r[0]['channel_address'], 'url' => z_root()]; } @@ -1625,13 +1627,13 @@ function notifications_on($channel_id,$value) { function get_channel_default_perms($uid) { - $r = q("select abook_my_perms from abook where abook_channel = %d and abook_self = 1 limit 1", + $r = q("select abook_xchan from abook where abook_channel = %d and abook_self = 1 limit 1", intval($uid) ); if($r) - return $r[0]['abook_my_perms']; + return load_abconfig($uid,$r[0]['abook_xchan'],'my_perms'); - return 0; + return array(); } |