feat(protocol): send and receive official my-device chats

Pad and phone device conversations were missing from the friend list
and arrived as empty private messages. They now show up as stable
contacts and support text send/receive.

Fixes #452
This commit is contained in:
DrSmoothl committed 2026-09-14 19:34:42 +08:00
1 parent 60c9669abd
commit dac3deb7bd
16 files changed
+692 -17

No files matched your search

@@ -1,4 +1,5 @@
import { describe, expect, it, vi } from 'vitest';
import { datalineFriendListEntries } from '@snowluma/protocol/dataline/device-contacts';
import type { GroupMemberInfo, GroupRequestInfo, QQGroupInfo } from '@snowluma/protocol/qq-info';
import { buildApiContext, type OneBotInstanceContext } from '../src/instance-context';
import {
@@ -688,6 +689,7 @@ describe('buildApiContext contact reads', () => {
await expect(api.getFriendList()).resolves.toEqual([
{ user_id: 22222, nickname: 'alice', remark: 'best-friend' },
...datalineFriendListEntries(),
]);
});