浏览代码

feat(external-api) set `privateMessage` flag on `incoming-message`

master
hmuresan 4 年前
父节点
当前提交
1196ede961
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 3
    2
      modules/API/API.js
  2. 1
    0
      react/features/chat/middleware.js

+ 3
- 2
modules/API/API.js 查看文件

@@ -592,8 +592,8 @@ class API {
592 592
      * @returns {void}
593 593
      */
594 594
     notifyReceivedChatMessage(
595
-            { body, id, nick, ts }: {
596
-                body: *, id: string, nick: string, ts: *
595
+            { body, id, nick, privateMessage, ts }: {
596
+                body: *, id: string, nick: string, privateMessage: boolean, ts: *
597 597
             } = {}) {
598 598
         if (APP.conference.isLocalId(id)) {
599 599
             return;
@@ -604,6 +604,7 @@ class API {
604 604
             from: id,
605 605
             message: body,
606 606
             nick,
607
+            privateMessage,
607 608
             stamp: ts
608 609
         });
609 610
     }

+ 1
- 0
react/features/chat/middleware.js 查看文件

@@ -247,6 +247,7 @@ function _handleReceivedMessage({ dispatch, getState }, { id, message, privateMe
247 247
             body: message,
248 248
             id,
249 249
             nick: displayName,
250
+            privateMessage,
250 251
             ts: timestamp
251 252
         });
252 253
 

正在加载...
取消
保存