mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Set plain message in _private_chat_handler
In case that plain is NULL we need to copy over from body. Fix https://github.com/profanity-im/profanity/issues/1144
This commit is contained in:
parent
ad9263520e
commit
19902e8e21
@ -922,6 +922,13 @@ _private_chat_handler(xmpp_stanza_t *const stanza)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!message->plain && !message->body) {
|
||||||
|
log_error("Message received without body from: %s", jid->str);
|
||||||
|
goto out;
|
||||||
|
} else if (!message->plain) {
|
||||||
|
message->plain = strdup(message->body);
|
||||||
|
}
|
||||||
|
|
||||||
message->timestamp = stanza_get_delay(stanza);
|
message->timestamp = stanza_get_delay(stanza);
|
||||||
message->body = xmpp_message_get_body(stanza);
|
message->body = xmpp_message_get_body(stanza);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user