feat(ui-flow): IPC for channel permission overwrites
Wire upsert-channel-overwrite and delete-channel-overwrite to platform APIs.
This commit is contained in:
@@ -649,6 +649,25 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'upsert-channel-overwrite') {
|
||||
await platform.upsertChannelPermissionOverwrite(msg.channelId, {
|
||||
targetType: msg.targetType,
|
||||
targetId: msg.targetId,
|
||||
allowView: msg.allowView,
|
||||
denyView: msg.denyView
|
||||
})
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'delete-channel-overwrite') {
|
||||
await platform.deleteChannelPermissionOverwrite(
|
||||
msg.channelId,
|
||||
msg.targetType,
|
||||
msg.targetId
|
||||
)
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'set-slowmode') {
|
||||
await platform.setChannelSlowmode(msg.channelId, msg.slowmodeSeconds)
|
||||
pushState()
|
||||
|
||||
Reference in New Issue
Block a user