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.
This commit is contained in:
JC Brand 2021-10-30 20:19:34 +02:00
parent 5abec5bff0
commit 6177afd5b1

View File

@ -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) {