about summary refs log tree commit diff stats
path: root/src/event
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-04-06 18:55:20 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-04-06 19:15:06 +0200
commit3b2976c9cb740c5cbd45547e26e725f2bae847a2 (patch)
treef228b0f7629b3f10ca744247041134da3a91277e /src/event
parent3524a53c7c61783f021111755a5617b56bfaa234 (diff)
downloadprofani-tty-3b2976c9cb740c5cbd45547e26e725f2bae847a2.tar.gz
db: Use type from message struct instead of having individual functions
Diffstat (limited to 'src/event')
-rw-r--r--src/event/server_events.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index e75db88e..b63af3b6 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -301,7 +301,7 @@ static void _log_muc(ProfMessage *message)
     } else {
         groupchat_log_msg_in(message->jid->barejid, message->jid->resourcepart, message->plain);
     }
-    log_database_add_incoming_muc(message);
+    log_database_add_incoming(message);
 }
 
 void
@@ -401,7 +401,7 @@ sv_ev_incoming_private_message(ProfMessage *message)
     }
 
     _clean_incoming_message(message);
-    log_database_add_incoming_muc_pm(message);
+    log_database_add_incoming(message);
     privwin_incoming_msg(privatewin, message);
     chat_log_msg_in(message);
 
@@ -537,7 +537,7 @@ _sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message
     if (message->plain) {
         message->enc = PROF_MSG_ENC_PGP;
         _clean_incoming_message(message);
-        log_database_add_incoming_chat(message);
+        log_database_add_incoming(message);
         chatwin_incoming_msg(chatwin, message, new_win);
         if (logit) {
             chat_log_pgp_msg_in(message);
@@ -553,7 +553,7 @@ _sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message
         message->enc = PROF_MSG_ENC_NONE;
         message->plain = strdup(message->body);
         _clean_incoming_message(message);
-        log_database_add_incoming_chat(message);
+        log_database_add_incoming(message);
         chatwin_incoming_msg(chatwin, message, new_win);
         chat_log_msg_in(message);
         chatwin->pgp_recv = FALSE;
@@ -576,7 +576,7 @@ _sv_ev_incoming_otr(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message
         }
 
         _clean_incoming_message(message);
-        log_database_add_incoming_chat(message);
+        log_database_add_incoming(message);
         chatwin_incoming_msg(chatwin, message, new_win);
 
         chat_log_otr_msg_in(message);
@@ -592,7 +592,7 @@ static void
 _sv_ev_incoming_omemo(ProfChatWin *chatwin, gboolean new_win, ProfMessage *message, gboolean logit)
 {
     _clean_incoming_message(message);
-    log_database_add_incoming_chat(message);
+    log_database_add_incoming(message);
     chatwin_incoming_msg(chatwin, message, new_win);
     if (logit) {
         chat_log_omemo_msg_in(message);
@@ -608,7 +608,7 @@ _sv_ev_incoming_plain(ProfChatWin *chatwin, gboolean new_win, ProfMessage *messa
         message->enc = PROF_MSG_ENC_NONE;
         message->plain = strdup(message->body);
         _clean_incoming_message(message);
-        log_database_add_incoming_chat(message);
+        log_database_add_incoming(message);
         chatwin_incoming_msg(chatwin, message, new_win);
         if (logit) {
             chat_log_msg_in(message);
amp;id=5ccf2653fb7d31b013f77df4e92e964e45c54f8a'>^
af571dd8 ^

f5465e12 ^
2f02189d ^
af571dd8 ^


9570363a ^
af571dd8 ^
513ba330 ^
af571dd8 ^
513ba330 ^


56356de8 ^

bf37b4d5 ^
a675eda3 ^
56356de8 ^


76755b28 ^


edfc4cf8 ^
36365244 ^



d55e7738 ^

78477622 ^



7452d052 ^




af571dd8 ^

a675eda3 ^
f5465e12 ^


f6b44306 ^
2f02189d ^
f6b44306 ^



af571dd8 ^
f6b44306 ^
f5465e12 ^
f6b44306 ^
f5465e12 ^
6a9d8191 ^

f6b44306 ^

ff229aec ^
f6b44306 ^
2f02189d ^
f6b44306 ^
2f02189d ^
0428419c ^
2f02189d ^
f6b44306 ^
2f02189d ^
f5465e12 ^
f6b44306 ^
f5465e12 ^
f6b44306 ^
76755b28 ^
2f02189d ^
76755b28 ^
f6b44306 ^
76755b28 ^
f6b44306 ^
2f02189d ^




5fe060d5 ^
f344b250 ^









2f02189d ^
76755b28 ^



2f02189d ^

76755b28 ^

f6b44306 ^
2f02189d ^


fbbbd625 ^
2f02189d ^





f344b250 ^

2f02189d ^

ff229aec ^
2f02189d ^
c842d90b ^


70471628 ^


32b8fac2 ^
2f02189d ^



23d3a022 ^









f6b44306 ^
81a324be ^
2f02189d ^

81a324be ^
c842d90b ^
81a324be ^
ff229aec ^


81a324be ^
ff229aec ^
2f02189d ^
7df951ea ^


2f02189d ^



76755b28 ^
f6b44306 ^

f5465e12 ^
f6b44306 ^
d009e158 ^
f6b44306 ^

d009e158 ^
f6b44306 ^

d009e158 ^
f6b44306 ^
aa42c864 ^
2f02189d ^
0428419c ^
f5465e12 ^
9570363a ^

f5465e12 ^
2f02189d ^












0428419c ^
f6b44306 ^
ff229aec ^
2f02189d ^
ff229aec ^
f5465e12 ^
2f02189d ^

ff229aec ^
2f02189d ^
4bf7453a ^








c842d90b ^

f6b44306 ^
2f02189d ^
f6b44306 ^
56356de8 ^

c603cd6c ^
f6b44306 ^
c603cd6c ^
f6b44306 ^
c603cd6c ^

762b099e ^
c603cd6c ^
762b099e ^
c603cd6c ^
56356de8 ^











2f02189d ^
56356de8 ^
2f02189d ^
8e7b4429 ^
f5465e12 ^
f6b44306 ^

2f02189d ^




f5465e12 ^
2f02189d ^


f5465e12 ^






a675eda3 ^
f5465e12 ^
eea17dee ^
f5465e12 ^
2f02189d ^

f5465e12 ^
2f02189d ^




f5465e12 ^

2f02189d ^
f5465e12 ^

2f02189d ^



dcc060c7 ^
2f02189d ^
f5465e12 ^
f6b44306 ^
b514fbb9 ^

e877e1fc ^
a675eda3 ^
e877e1fc ^
fd5e720b ^



e877e1fc ^

b514fbb9 ^


70763af3 ^








6845c4d9 ^
70763af3 ^




b514fbb9 ^
f6b44306 ^
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350