浏览代码

MUC: Don't send markers for non-groupchat messages.

I noticed that a marker was sent for an error message (created due to an
unencryptable OMEMO messages), and this caused the user to be kicked
from the MUC.
JC Brand 3 年之前
父节点
当前提交
6177afd5b1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/headless/plugins/muc/muc.js

+ 1 - 1
src/headless/plugins/muc/muc.js

@@ -221,7 +221,7 @@ const ChatRoomMixin = {
      *  message, even if it didn't include a `markable` element.
      */
     sendMarkerForMessage (msg, type = 'displayed', force = false) {
-        if (!msg || !api.settings.get('send_chat_markers').includes(type)) {
+        if (!msg || !api.settings.get('send_chat_markers').includes(type) || msg?.get('type') !== 'groupchat') {
             return;
         }
         if (msg?.get('is_markable') || force) {