feat(realtime): complete fake channel reply flow

This commit is contained in:
2026-07-13 14:57:28 +08:00
parent a712b91982
commit d16bb55d91
24 changed files with 1441 additions and 840 deletions
@@ -758,6 +758,22 @@ describe('#mutations', () => {
});
describe('#UPDATE_CONVERSATION', () => {
it('should ignore malformed realtime payloads without an id', () => {
const state = {
allConversations: [{ id: 1, status: 'open', meta: {} }],
conversationFilters: {},
};
mutations[types.UPDATE_CONVERSATION](state, {
conversation: { id: 1 },
message: { id: 2 },
});
expect(state.allConversations).toEqual([
{ id: 1, status: 'open', meta: {} },
]);
});
it('should update existing conversation', () => {
const state = {
allConversations: [