mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05: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:
parent
9ef3491228
commit
f30999fd51
@ -545,6 +545,14 @@ static void
|
|||||||
_sv_ev_incoming_ox(ProfChatWin* chatwin, gboolean new_win, ProfMessage* message, gboolean logit)
|
_sv_ev_incoming_ox(ProfChatWin* chatwin, gboolean new_win, ProfMessage* message, gboolean logit)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBGPGME
|
#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);
|
//_clean_incoming_message(message);
|
||||||
chatwin_incoming_msg(chatwin, message, new_win);
|
chatwin_incoming_msg(chatwin, message, new_win);
|
||||||
log_database_add_incoming(message);
|
log_database_add_incoming(message);
|
||||||
|
Loading…
Reference in New Issue
Block a user