feat(ui-flow): IPC for custom guild role CRUD and member assignments
Handles create-guild-custom-role, update-guild-custom-role, delete-guild-custom-role, and set-member-custom-roles messages from server settings UI. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -550,6 +550,34 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'create-guild-custom-role') {
|
||||
await platform.createGuildCustomRole({
|
||||
name: msg.name,
|
||||
color: msg.color,
|
||||
permissions: msg.permissions
|
||||
})
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'update-guild-custom-role') {
|
||||
await platform.updateGuildCustomRole(msg.roleId, {
|
||||
name: msg.name,
|
||||
color: msg.color,
|
||||
permissions: msg.permissions
|
||||
})
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'delete-guild-custom-role') {
|
||||
await platform.deleteGuildCustomRole(msg.roleId)
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'set-member-custom-roles') {
|
||||
await platform.setMemberCustomRoles(msg.userId, msg.roleIds || [])
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
if (t === 'update-notification-prefs') {
|
||||
await platform.updateNotificationPrefs(msg.prefs || {})
|
||||
pushState()
|
||||
|
||||
Reference in New Issue
Block a user