feat(ui-flow): composer focus after ban/kick/timeout IPC (Phase 535)
Emit composer-focus-channel when guild mode retains activeChannelId after member moderation actions complete. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
Pearcord desktop UI IPC dispatch and automated flow scenarios for Bare smokes. Mirrors `apps/pearcord` pear-pipe message handling.
|
Pearcord desktop UI IPC dispatch and automated flow scenarios for Bare smokes. Mirrors `apps/pearcord` pear-pipe message handling.
|
||||||
|
|
||||||
|
**v0.8.498 (Phase 535):** `ban-member`, `kick-member`, and `timeout-member` emit `composer-focus-channel` in guild mode when `activeChannelId` is set. Bundle: `npm run test:phase535-moderation` (app repo).
|
||||||
|
|
||||||
**v0.8.497 (Phase 534):** `create-guild-custom-role`, `update-guild-custom-role`, `upsert-channel-overwrite`, and `delete-channel-overwrite` emit `composer-focus-channel` in guild mode when `activeChannelId` is set. Bundle: `npm run test:phase534-roles` (app repo).
|
**v0.8.497 (Phase 534):** `create-guild-custom-role`, `update-guild-custom-role`, `upsert-channel-overwrite`, and `delete-channel-overwrite` emit `composer-focus-channel` in guild mode when `activeChannelId` is set. Bundle: `npm run test:phase534-roles` (app repo).
|
||||||
|
|
||||||
**v0.8.496 (Phase 533):** `delete-channel` and `reorder-channels` emit `composer-focus-channel` when `platform.mode === 'guild'` and `activeChannelId` is set. Bundle: `npm run test:phase533-guild-admin` (app repo).
|
**v0.8.496 (Phase 533):** `delete-channel` and `reorder-channels` emit `composer-focus-channel` when `platform.mode === 'guild'` and `activeChannelId` is set. Bundle: `npm run test:phase533-guild-admin` (app repo).
|
||||||
|
|||||||
@@ -1480,11 +1480,23 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
|||||||
}
|
}
|
||||||
if (t === 'ban-member') {
|
if (t === 'ban-member') {
|
||||||
await platform.banMember({ userId: msg.userId, reason: msg.reason })
|
await platform.banMember({ userId: msg.userId, reason: msg.reason })
|
||||||
|
if (platform.mode === 'guild' && platform.activeChannelId) {
|
||||||
|
send({
|
||||||
|
type: 'composer-focus-channel',
|
||||||
|
channelId: platform.activeChannelId
|
||||||
|
})
|
||||||
|
}
|
||||||
pushState()
|
pushState()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if (t === 'kick-member') {
|
if (t === 'kick-member') {
|
||||||
await platform.kickMember({ userId: msg.userId, reason: msg.reason })
|
await platform.kickMember({ userId: msg.userId, reason: msg.reason })
|
||||||
|
if (platform.mode === 'guild' && platform.activeChannelId) {
|
||||||
|
send({
|
||||||
|
type: 'composer-focus-channel',
|
||||||
|
channelId: platform.activeChannelId
|
||||||
|
})
|
||||||
|
}
|
||||||
pushState()
|
pushState()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -1494,6 +1506,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
|||||||
durationMinutes: msg.durationMinutes,
|
durationMinutes: msg.durationMinutes,
|
||||||
reason: msg.reason
|
reason: msg.reason
|
||||||
})
|
})
|
||||||
|
if (platform.mode === 'guild' && platform.activeChannelId) {
|
||||||
|
send({
|
||||||
|
type: 'composer-focus-channel',
|
||||||
|
channelId: platform.activeChannelId
|
||||||
|
})
|
||||||
|
}
|
||||||
pushState()
|
pushState()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user