1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

ox: handle empty message->plain

In case we dont have plain but have body, copy this (like in
_sv_ev_incoming_pgp).
In case we have neither, return.
This commit is contained in:
Michael Vetter 2022-07-04 16:40:44 +02:00
parent 9ef3491228
commit f30999fd51

View File

@ -545,6 +545,14 @@ static void
_sv_ev_incoming_ox(ProfChatWin* chatwin, gboolean new_win, ProfMessage* message, gboolean logit)
{
#ifdef HAVE_LIBGPGME
if (message->plain == NULL) {
if (message->body == NULL) {
log_error("Couldn't decrypt OX message and body was empty");
return;
}
message->plain = strdup(message->body);
}
//_clean_incoming_message(message);
chatwin_incoming_msg(chatwin, message, new_win);
log_database_add_incoming(message);