aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzot.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r--Zotlabs/Lib/Libzot.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 44f1f399e..f0fe3ab24 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -326,14 +326,10 @@ class Libzot {
if($permissions && is_array($permissions)) {
$old_read_stream_perm = get_abconfig($channel['channel_id'],$x['hash'],'their_perms','view_stream');
- // We need to reset their_perms prior to setting the new ones.
- // Otherwise withdrawn permissions will not take effect locally.
- q("DELETE FROM abconfig WHERE chan = %d AND xchan = '%s' AND cat = 'their_perms'",
- intval($channel['channel_id']),
- dbesc($x['hash'])
- );
- foreach($permissions as $p) {
- set_abconfig($channel['channel_id'],$x['hash'],'their_perms',$p,'1');
+ $permissions = Permissions::FilledPerms($permissions);
+
+ foreach($permissions as $k => $v) {
+ set_abconfig($channel['channel_id'],$x['hash'],'their_perms',$k,$v);
}
}