Make emoji_likes_list optional in OB11Message

Changed the OB11Message interface to make emoji_likes_list optional and updated GetMsg to initialize emoji_likes_list as an empty array before populating it. This prevents errors when the field is missing and improves type safety.
This commit is contained in:
手瓜一十雪 committed 2026-01-13 17:08:31 +08:00
1 parent 31f03b6109
commit 562dc8f06b
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ export interface OB11Message {
font: number;
post_type?: EventType;
raw?: RawMessage;
emoji_likes_list: Array<{ emoji_id: string; emoji_type: string; likes_cnt: string; }>;// 仅get_msg生效
emoji_likes_list?: Array<{ emoji_id: string; emoji_type: string; likes_cnt: string; }>;// 仅get_msg生效
}
// 合并转发消息接口定义