about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/command/command.c8
-rw-r--r--src/command/commands.c16
-rw-r--r--src/server_events.c2
-rw-r--r--src/ui/core.c12
-rw-r--r--src/ui/ui.h6
-rw-r--r--tests/ui/stub_ui.c6
6 files changed, 22 insertions, 28 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 806a75f2..0bca4212 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -1960,7 +1960,7 @@ _cmd_execute_default(const char * inp)
                             jid_destroy(jidp);
                         }
 
-                        ui_outgoing_chat_msg("me", chatwin->barejid, inp, id);
+                        ui_outgoing_chat_msg(chatwin->barejid, inp, id);
                     } else {
                         cons_show_error("Failed to send message.");
                     }
@@ -1973,7 +1973,7 @@ _cmd_execute_default(const char * inp)
                         jid_destroy(jidp);
                     }
 
-                    ui_outgoing_chat_msg("me", chatwin->barejid, inp, id);
+                    ui_outgoing_chat_msg(chatwin->barejid, inp, id);
                 }
 #else
                 char *id = message_send_chat(chatwin->barejid, inp);
@@ -1984,7 +1984,7 @@ _cmd_execute_default(const char * inp)
                     jid_destroy(jidp);
                 }
 
-                ui_outgoing_chat_msg("me", chatwin->barejid, inp, id);
+                ui_outgoing_chat_msg(chatwin->barejid, inp, id);
 #endif
             }
             break;
@@ -1995,7 +1995,7 @@ _cmd_execute_default(const char * inp)
             } else {
                 ProfPrivateWin *privatewin = wins_get_current_private();
                 message_send_private(privatewin->fulljid, inp);
-                ui_outgoing_private_msg("me", privatewin->fulljid, inp);
+                ui_outgoing_private_msg(privatewin->fulljid, inp);
             }
             break;
 
diff --git a/src/command/commands.c b/src/command/commands.c
index 549a733d..8075e2c0 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -1240,7 +1240,7 @@ cmd_msg(gchar **args, struct cmd_help_t help)
 
             if (msg != NULL) {
                 message_send_private(full_jid->str, msg);
-                ui_outgoing_private_msg("me", full_jid->str, msg);
+                ui_outgoing_private_msg(full_jid->str, msg);
             } else {
                 ui_new_private_win(full_jid->str);
             }
@@ -1267,7 +1267,7 @@ cmd_msg(gchar **args, struct cmd_help_t help)
                 if (encrypted != NULL) {
                     char *id = message_send_chat_encrypted(barejid, encrypted);
                     otr_free_message(encrypted);
-                    ui_outgoing_chat_msg("me", barejid, msg, id);
+                    ui_outgoing_chat_msg(barejid, msg, id);
 
                     if (((win_type == WIN_CHAT) || (win_type == WIN_CONSOLE)) && prefs_get_boolean(PREF_CHLOG)) {
                         const char *jid = jabber_get_fulljid();
@@ -1301,7 +1301,7 @@ cmd_msg(gchar **args, struct cmd_help_t help)
                 } else {
                     id = message_send_chat(barejid, msg);
                 }
-                ui_outgoing_chat_msg("me", barejid, msg, id);
+                ui_outgoing_chat_msg(barejid, msg, id);
 
                 if (((win_type == WIN_CHAT) || (win_type == WIN_CONSOLE)) && prefs_get_boolean(PREF_CHLOG)) {
                     const char *jid = jabber_get_fulljid();
@@ -1313,7 +1313,7 @@ cmd_msg(gchar **args, struct cmd_help_t help)
             return TRUE;
 #else
             char *id = message_send_chat(barejid, msg);
-            ui_outgoing_chat_msg("me", barejid, msg, id);
+            ui_outgoing_chat_msg(barejid, msg, id);
 
             if (((win_type == WIN_CHAT) || (win_type == WIN_CONSOLE)) && prefs_get_boolean(PREF_CHLOG)) {
                 const char *jid = jabber_get_fulljid();
@@ -3089,7 +3089,7 @@ cmd_tiny(gchar **args, struct cmd_help_t help)
                             jid_destroy(jidp);
                         }
 
-                        ui_outgoing_chat_msg("me", chatwin->barejid, tiny, id);
+                        ui_outgoing_chat_msg(chatwin->barejid, tiny, id);
                     } else {
                         cons_show_error("Failed to send message.");
                     }
@@ -3102,7 +3102,7 @@ cmd_tiny(gchar **args, struct cmd_help_t help)
                         jid_destroy(jidp);
                     }
 
-                    ui_outgoing_chat_msg("me", chatwin->barejid, tiny, id);
+                    ui_outgoing_chat_msg(chatwin->barejid, tiny, id);
                 }
 #else
                 char *id = message_send_chat(chatwin->barejid, tiny);
@@ -3113,12 +3113,12 @@ cmd_tiny(gchar **args, struct cmd_help_t help)
                     jid_destroy(jidp);
                 }
 
-                ui_outgoing_chat_msg("me", chatwin->barejid, tiny, id);
+                ui_outgoing_chat_msg(chatwin->barejid, tiny, id);
 #endif
             } else if (win_type == WIN_PRIVATE) {
                 ProfPrivateWin *privatewin = wins_get_current_private();
                 message_send_private(privatewin->fulljid, tiny);
-                ui_outgoing_private_msg("me", privatewin->fulljid, tiny);
+                ui_outgoing_private_msg(privatewin->fulljid, tiny);
             } else if (win_type == WIN_MUC) {
                 ProfMucWin *mucwin = wins_get_current_muc();
                 message_send_groupchat(mucwin->roomjid, tiny);
diff --git a/src/server_events.c b/src/server_events.c
index 3d14f0aa..d7504b64 100644
--- a/src/server_events.c
+++ b/src/server_events.c
@@ -310,7 +310,7 @@ handle_incoming_private_message(char *fulljid, char *message)
 
 void
 handle_carbon(char *barejid, char *message){
-    ui_outgoing_chat_msg("me", barejid, message, NULL);
+    ui_outgoing_chat_msg(barejid, message, NULL);
 }
 
 void
diff --git a/src/ui/core.c b/src/ui/core.c
index 08cddcb9..be49ed29 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -1423,8 +1423,7 @@ ui_open_xmlconsole_win(void)
 }
 
 void
-ui_outgoing_chat_msg(const char * const from, const char * const barejid,
-    const char * const message, char *id)
+ui_outgoing_chat_msg(const char * const barejid, const char * const message, char *id)
 {
     PContact contact = roster_get_contact(barejid);
     ProfWin *window = (ProfWin*)wins_get_chat(barejid);
@@ -1464,18 +1463,17 @@ ui_outgoing_chat_msg(const char * const from, const char * const barejid,
         GString *message_with_id = g_string_new(id);
         g_string_append(message_with_id, ": ");
         g_string_append(message_with_id, message);
-        win_print(window, '-', NULL, 0, THEME_TEXT_ME, from, message_with_id->str);
+        win_print(window, '-', NULL, 0, THEME_TEXT_ME, "me", message_with_id->str);
         g_string_free(message_with_id, TRUE);
         free(id);
     } else {
-        win_print(window, '-', NULL, 0, THEME_TEXT_ME, from, message);
+        win_print(window, '-', NULL, 0, THEME_TEXT_ME, "me", message);
     }
     ui_switch_win(num);
 }
 
 void
-ui_outgoing_private_msg(const char * const from, const char * const fulljid,
-    const char * const message)
+ui_outgoing_private_msg(const char * const fulljid, const char * const message)
 {
     ProfWin *window = (ProfWin*)wins_get_private(fulljid);
     int num = 0;
@@ -1490,7 +1488,7 @@ ui_outgoing_private_msg(const char * const from, const char * const fulljid,
         num = wins_get_num(window);
     }
 
-    win_print(window, '-', NULL, 0, THEME_TEXT_ME, from, message);
+    win_print(window, '-', NULL, 0, THEME_TEXT_ME, "me", message);
     ui_switch_win(num);
 }
 
diff --git a/src/ui/ui.h b/src/ui/ui.h
index a6428da3..9c8b9b4d 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -121,10 +121,8 @@ void ui_message_receipt(const char * const barejid, const char * const id);
 void ui_disconnected(void);
 void ui_recipient_gone(const char * const barejid, const char * const resource);
 
-void ui_outgoing_chat_msg(const char * const from, const char * const barejid,
-    const char * const message, char *id);
-void ui_outgoing_private_msg(const char * const from, const char * const fulljid,
-    const char * const message);
+void ui_outgoing_chat_msg(const char * const barejid, const char * const message, char *id);
+void ui_outgoing_private_msg(const char * const fulljid, const char * const message);
 
 void ui_room_join(const char * const roomjid, gboolean focus);
 void ui_switch_to_room(const char * const roomjid);
diff --git a/tests/ui/stub_ui.c b/tests/ui/stub_ui.c
index 4ae08ee7..802286ba 100644
--- a/tests/ui/stub_ui.c
+++ b/tests/ui/stub_ui.c
@@ -201,10 +201,8 @@ void ui_incoming_private_msg(const char * const fulljid, const char * const mess
 void ui_disconnected(void) {}
 void ui_recipient_gone(const char * const barejid, const char * const resource) {}
 
-void ui_outgoing_chat_msg(const char * const from, const char * const barejid,
-    const char * const message, char *id) {}
-void ui_outgoing_private_msg(const char * const from, const char * const fulljid,
-    const char * const message) {}
+void ui_outgoing_chat_msg(const char * const barejid, const char * const message, char *id) {}
+void ui_outgoing_private_msg(const char * const fulljid, const char * const message) {}
 
 void ui_room_join(const char * const roomjid, gboolean focus) {}
 void ui_switch_to_room(const char * const roomjid) {}
98d2e6aec977b'>90560d71 ^
4bbd3ded ^
90560d71 ^
9542bb11 ^
dbe12410 ^
672e3e50 ^
dbe12410 ^


90560d71 ^
90560d71 ^

90560d71 ^

dbe12410 ^

90560d71 ^
dbe12410 ^
90560d71 ^
dbe12410 ^

90560d71 ^
dbe12410 ^





90560d71 ^
dbe12410 ^
9542bb11 ^
dbe12410 ^
672e3e50 ^

9570363a ^
90560d71 ^
9570363a ^









672e3e50 ^
dbe12410 ^





90560d71 ^
dbe12410 ^
dbe12410 ^

90560d71 ^
4fe9f5e8 ^


dbe12410 ^
90560d71 ^

dbe12410 ^



90560d71 ^


dbe12410 ^



672e3e50 ^



dbe12410 ^
672e3e50 ^
4bbd3ded ^



dbe12410 ^







4bbd3ded ^
672e3e50 ^




dbe12410 ^
c5ffb6e1 ^
672e3e50 ^

dbe12410 ^





















672e3e50 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234