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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user