Migrate frontend realtime messaging to SSE.

Switch service integrations and screen/store consumers from websocket events to SSE, and ignore generated dist-web artifacts.

Made-with: Cursor
This commit is contained in:
2026-03-10 12:58:23 +08:00
parent 63e32b15a3
commit be84c01abd
25 changed files with 974 additions and 1305 deletions

View File

@@ -6,7 +6,7 @@
import * as Notifications from 'expo-notifications';
import { Platform, AppState, AppStateStatus } from 'react-native';
import type { WSChatMessage, WSNotificationMessage, WSAnnouncementMessage } from './websocketService';
import type { WSChatMessage, WSNotificationMessage, WSAnnouncementMessage } from './sseService';
import { extractTextFromSegments } from '../types/dto';
// 通知渠道配置
@@ -169,9 +169,9 @@ class SystemNotificationService {
data: {
type: message.type,
id: String(message.id),
senderId: message.sender_id,
receiverId: message.receiver_id,
systemType: message.system_type,
senderId: message.sender_id || '',
receiverId: message.receiver_id || '',
systemType: message.system_type || '',
extraData: JSON.stringify(message.extra_data || {}),
},
type,