Renamed enc_message parameter for incoming messages
This commit is contained in:
@@ -193,9 +193,9 @@ sv_ev_incoming_carbon(char *barejid, char *resource, char *message)
|
|||||||
|
|
||||||
#ifdef HAVE_LIBGPGME
|
#ifdef HAVE_LIBGPGME
|
||||||
static void
|
static void
|
||||||
_sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, char *barejid, char *resource, char *message, char *enc_message)
|
_sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, char *barejid, char *resource, char *message, char *pgp_message)
|
||||||
{
|
{
|
||||||
char *decrypted = p_gpg_decrypt(enc_message);
|
char *decrypted = p_gpg_decrypt(pgp_message);
|
||||||
if (decrypted) {
|
if (decrypted) {
|
||||||
if (chatwin->enc_mode == PROF_ENC_NONE) {
|
if (chatwin->enc_mode == PROF_ENC_NONE) {
|
||||||
win_println((ProfWin*)chatwin, 0, "PGP encryption enabled.");
|
win_println((ProfWin*)chatwin, 0, "PGP encryption enabled.");
|
||||||
@@ -239,7 +239,7 @@ _sv_ev_incoming_plain(ProfChatWin *chatwin, gboolean new_win, char *barejid, cha
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
sv_ev_incoming_message(char *barejid, char *resource, char *message, char *enc_message)
|
sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_message)
|
||||||
{
|
{
|
||||||
gboolean new_win = FALSE;
|
gboolean new_win = FALSE;
|
||||||
ProfChatWin *chatwin = wins_get_chat(barejid);
|
ProfChatWin *chatwin = wins_get_chat(barejid);
|
||||||
@@ -252,11 +252,11 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *enc_m
|
|||||||
// OTR suported, PGP supported
|
// OTR suported, PGP supported
|
||||||
#ifdef HAVE_LIBOTR
|
#ifdef HAVE_LIBOTR
|
||||||
#ifdef HAVE_LIBGPGME
|
#ifdef HAVE_LIBGPGME
|
||||||
if (enc_message) {
|
if (pgp_message) {
|
||||||
if (chatwin->enc_mode == PROF_ENC_OTR) {
|
if (chatwin->enc_mode == PROF_ENC_OTR) {
|
||||||
win_println((ProfWin*)chatwin, 0, "PGP encrypted message received whilst in OTR session.");
|
win_println((ProfWin*)chatwin, 0, "PGP encrypted message received whilst in OTR session.");
|
||||||
} else { // PROF_ENC_NONE, PROF_ENC_PGP
|
} else { // PROF_ENC_NONE, PROF_ENC_PGP
|
||||||
_sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, enc_message);
|
_sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, pgp_message);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (chatwin->enc_mode == PROF_ENC_PGP) {
|
if (chatwin->enc_mode == PROF_ENC_PGP) {
|
||||||
@@ -281,8 +281,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *enc_m
|
|||||||
// OTR unsupported, PGP supported
|
// OTR unsupported, PGP supported
|
||||||
#ifndef HAVE_LIBOTR
|
#ifndef HAVE_LIBOTR
|
||||||
#ifdef HAVE_LIBGPGME
|
#ifdef HAVE_LIBGPGME
|
||||||
if (enc_message) {
|
if (pgp_message) {
|
||||||
_sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, enc_message);
|
_sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, pgp_message);
|
||||||
} else {
|
} else {
|
||||||
_sv_ev_incoming_plain(chatwin, new_win, barejid, resource, message);
|
_sv_ev_incoming_plain(chatwin, new_win, barejid, resource, message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ void sv_ev_room_history(const char * const room_jid, const char * const nick,
|
|||||||
GDateTime *timestamp, const char * const message);
|
GDateTime *timestamp, const char * const message);
|
||||||
void sv_ev_room_message(const char * const room_jid, const char * const nick,
|
void sv_ev_room_message(const char * const room_jid, const char * const nick,
|
||||||
const char * const message);
|
const char * const message);
|
||||||
void sv_ev_incoming_message(char *barejid, char *resource, char *message, char *enc_message);
|
void sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_message);
|
||||||
void sv_ev_incoming_private_message(const char * const fulljid, char *message);
|
void sv_ev_incoming_private_message(const char * const fulljid, char *message);
|
||||||
void sv_ev_delayed_message(char *fulljid, char *message, GDateTime *timestamp);
|
void sv_ev_delayed_message(char *fulljid, char *message, GDateTime *timestamp);
|
||||||
void sv_ev_delayed_private_message(const char * const fulljid, char *message, GDateTime *timestamp);
|
void sv_ev_delayed_private_message(const char * const fulljid, char *message, GDateTime *timestamp);
|
||||||
|
|||||||
Reference in New Issue
Block a user