fix(protocol): retain C2C peer identities
Carry the stable sender identity through decoded private-message events and persist the UID/UIN pair at the receive boundary. This keeps later conversation operations independent of stale message rows or fallible profile lookups, with regression coverage for decoding and identity indexing.
This commit is contained in:
5 files changed
+40
-2
No files matched your search
@@ -43,7 +43,9 @@ describe('parseMsgPush — empty message drop (#102)', () => {
|
||||
body: { richText: { elems: [{ text: { str: 'hi' } }] } },
|
||||
}), identity);
|
||||
expect(out).toHaveLength(1);
|
||||
expect(out[0]).toMatchObject({ kind: 'friend_message', elements: [{ type: 'text', text: 'hi' }] });
|
||||
expect(out[0]).toMatchObject({
|
||||
kind: 'friend_message', senderUid: 'u_x', elements: [{ type: 'text', text: 'hi' }],
|
||||
});
|
||||
});
|
||||
|
||||
it('drops a C2C control push by (msgType, c2cCmd) even when it carries content', () => {
|
||||
|
||||
Reference in new issue
Block a user