about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2019-06-21 13:49:17 +0200
committerPaul Fariello <paul@fariello.eu>2019-06-21 15:52:24 +0200
commitdb8f32c049fd18a18c210ca35a20725214673b2d (patch)
tree572efe975f82b27c56ac71194a425c82a617c28d /src/ui
parent3bba3d98129cd09657a2f0a58baf11b74b45fe65 (diff)
downloadprofani-tty-db8f32c049fd18a18c210ca35a20725214673b2d.tar.gz
Fix handling of encrypted carbons
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/chatwin.c8
-rw-r--r--src/ui/ui.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c
index 5a32b5ae..006b5ca6 100644
--- a/src/ui/chatwin.c
+++ b/src/ui/chatwin.c
@@ -329,20 +329,20 @@ chatwin_outgoing_msg(ProfChatWin *chatwin, const char *const message, char *id,
 }
 
 void
-chatwin_outgoing_carbon(ProfChatWin *chatwin, const char *const message, prof_enc_t enc_mode)
+chatwin_outgoing_carbon(ProfChatWin *chatwin, ProfMessage *message)
 {
     assert(chatwin != NULL);
 
     char enc_char = '-';
-    if (enc_mode == PROF_MSG_ENC_PGP) {
+    if (message->enc == PROF_MSG_ENC_PGP) {
         enc_char = prefs_get_pgp_char();
-    } else if (enc_mode == PROF_MSG_ENC_OMEMO) {
+    } else if (message->enc == PROF_MSG_ENC_OMEMO) {
         enc_char = prefs_get_omemo_char();
     }
 
     ProfWin *window = (ProfWin*)chatwin;
 
-    win_print_outgoing(window, enc_char, "%s", message);
+    win_print_outgoing(window, enc_char, "%s", message->plain);
     int num = wins_get_num(window);
     status_bar_active(num, WIN_CHAT, chatwin->barejid);
 }
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 7c5bed89..f6872938 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -125,7 +125,7 @@ void chatwin_receipt_received(ProfChatWin *chatwin, const char *const id);
 void chatwin_recipient_gone(ProfChatWin *chatwin);
 void chatwin_outgoing_msg(ProfChatWin *chatwin, const char *const message, char *id, prof_enc_t enc_mode,
     gboolean request_receipt);
-void chatwin_outgoing_carbon(ProfChatWin *chatwin, const char *const message, prof_enc_t enc_mode);
+void chatwin_outgoing_carbon(ProfChatWin *chatwin, ProfMessage *message);
 void chatwin_contact_online(ProfChatWin *chatwin, Resource *resource, GDateTime *last_activity);
 void chatwin_contact_offline(ProfChatWin *chatwin, char *resource, char *status);
 char* chatwin_get_string(ProfChatWin *chatwin);