Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions src/xmpp/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,18 +477,37 @@ message_send_chat_pgp(const char* const barejid, const char* const msg, gboolean
xmpp_stanza_add_child(message, x);
xmpp_stanza_release(x);
} else {
message = xmpp_message_new(ctx, STANZA_TYPE_CHAT, jid, id);
xmpp_message_set_body(message, msg);
ProfChatWin* chatwin = wins_get_chat(barejid);
if (chatwin) {
win_println((ProfWin*)chatwin, THEME_ERROR, "!", "PGP encryption failed. Message not sent.");
} else {
cons_show_error("PGP encryption failed. Message not sent.");
}
g_free(id);
account_free(account);
return NULL;
}
} else {
message = xmpp_message_new(ctx, STANZA_TYPE_CHAT, jid, id);
xmpp_message_set_body(message, msg);
ProfChatWin* chatwin = wins_get_chat(barejid);
if (chatwin) {
win_println((ProfWin*)chatwin, THEME_ERROR, "!", "PGP key ID not set for account. Message not sent.");
} else {
cons_show_error("PGP key ID not set for account. Message not sent.");
}
g_free(id);
account_free(account);
return NULL;
}
account_free(account);
#else
// ?
message = xmpp_message_new(ctx, STANZA_TYPE_CHAT, jid, id);
xmpp_message_set_body(message, msg);
ProfChatWin* chatwin = wins_get_chat(barejid);
if (chatwin) {
win_println((ProfWin*)chatwin, THEME_ERROR, "!", "PGP support is not included in this build. Message not sent.");
} else {
cons_show_error("PGP support is not included in this build. Message not sent.");
}
g_free(id);
return NULL;
#endif

if (state) {
Expand Down
Loading