fix(msg): unswap markRead import aliases in Bridge
The `markGroupMsgAsRead` / `markPrivateMsgAsRead` Bridge methods were
calling the wrong underlying implementations because the alias names
on the import line were swapped:
- `markPrivateMessageRead as markGroupMsgAsRead_` meant calling
`bridge.markGroupMsgAsRead(groupId, …)` actually fired the c2c
(private) read-report wire shape with `groupId` shoved into the
`userId` slot — the server then resolved a uid for what was
really a groupId and posted to the wrong route.
- `markGroupMessageRead as markPrivateMsgAsRead_` was the mirror:
`bridge.markPrivateMsgAsRead(userId, …)` fired the group read-
report shape with `userId` in the `groupUin` field.
Realigned to the intended pairing. The underlying implementations
in `actions/group-message.ts` are already covered by
`tests/actions/group-message.test.ts` (asserts both hit
`SsoReadedReport` with their proper wire shapes); they pass
unchanged because they always tested the action-layer functions
directly, never the Bridge facade where the swap lived.
Caught while planning the #6 Api-on-ctx refactor — preserving the
swap into the new MessageApi would have carried the bug forward.
This commit is contained in:
1 parent
6c7e56d5a1
commit
9a678442e9
1 file changed
+8
-2
@@ -78,8 +78,14 @@ import {
|
||||
uploadPrivateFile as uploadPrivateFile_,
|
||||
} from './actions/group-file';
|
||||
import {
|
||||
markPrivateMessageRead as markGroupMsgAsRead_,
|
||||
markGroupMessageRead as markPrivateMsgAsRead_,
|
||||
// ⚠️ pre-fix history note: these two aliases were swapped here
|
||||
// (`markPrivateMessageRead as markGroupMsgAsRead_` /
|
||||
// `markGroupMessageRead as markPrivateMsgAsRead_`), meaning
|
||||
// `bridge.markGroupMsgAsRead(groupId, …)` actually fired the c2c
|
||||
// read-report wire shape with `groupId` in the `userId` slot, and
|
||||
// vice versa. Realigned with their intended names.
|
||||
markGroupMessageRead as markGroupMsgAsRead_,
|
||||
markPrivateMessageRead as markPrivateMsgAsRead_,
|
||||
recallGroupMessage as recallGroupMessage_,
|
||||
recallPrivateMessage as recallPrivateMessage_,
|
||||
setGroupEssence as setGroupEssence_,
|
||||
|
||||
Reference in new issue
Block a user