feat(contacts): composer focus after accept-friend-request

Phase 530 restores composer autofocus when in DM or guild channel.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-24 11:52:47 -04:00
co-authored by Cursor
parent e3debf2855
commit 2fd7a8a0a9
+6
View File
@@ -1169,6 +1169,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
}
if (t === 'accept-friend-request') {
await platform.acceptFriendRequest(msg.peerUserId)
if (platform.activeChannelId && (platform.mode === 'dm' || platform.mode === 'guild')) {
send({
type: 'composer-focus-channel',
channelId: platform.activeChannelId
})
}
pushState()
send({ type: 'show-toast', message: 'Friend request accepted' })
return true