Exit *_incoming_msg functions when plain message is empty

Fix https://github.com/profanity-im/profanity/issues/1733
This commit is contained in:
Michael Vetter
2022-07-04 16:45:18 +02:00
parent f30999fd51
commit c8b2979dcd
3 changed files with 17 additions and 0 deletions

View File

@@ -551,6 +551,11 @@ mucwin_incoming_msg(ProfMucWin* mucwin, const ProfMessage* const message, GSList
assert(mucwin != NULL);
int flags = 0;
if (message->plain == NULL) {
log_error("mucwin_incoming_msg: Message with no plain field from: %s", message->from_jid);
return;
}
if (filter_reflection && message_is_sent_by_us(message, TRUE)) {
/* Ignore reflection messages */
return;