Procházet zdrojové kódy

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 před 3 roky
rodič
revize
6177afd5b1
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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) {