Merge pull request #5848 from urbit/po/groups-fix-channel-writers-perms-issue

groups: fix issue with chanel perms caused by use of Set()
This commit is contained in:
Hunter Miller 2022-06-14 11:25:22 -05:00 committed by GitHub
commit fa255d494d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ export function GraphPermissions(props: GraphPermissionsProps) {
const initialValues = {
writePerms,
writers: writers
writers: [...writers]
.filter(x => x !== hostShip),
readerComments: association.metadata.vip === 'reader-comments'
};
@ -104,7 +104,7 @@ export function GraphPermissions(props: GraphPermissionsProps) {
resource: association.resource,
tag: 'writers'
};
const allWriters = writers.map(w => `~${w}`);
const allWriters = [...writers].map(w => `~${w}`);
if (values.readerComments !== readerComments) {
await airlock.poke(metadataEdit(association, {
vip: values.readerComments ? 'reader-comments' : ''