about summary refs log tree commit diff stats
path: root/src/xmpp/message.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-03-28 01:16:31 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-04-06 10:50:20 +0200
commita0a4fd042648f0b936621b076694283dd577f016 (patch)
tree8d4164fdc512ec74fb139e78aec45fe8b70b55ab /src/xmpp/message.c
parentdef212321636b13a72fdff71431fc003ad791482 (diff)
downloadprofani-tty-a0a4fd042648f0b936621b076694283dd577f016.tar.gz
db: log all incoming and outgoing messages
Diffstat (limited to 'src/xmpp/message.c')
-rw-r--r--src/xmpp/message.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 5f3b65ac..d482f258 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -508,7 +508,7 @@ message_send_chat_omemo(const char *const jid, uint32_t sid, GList *keys,
 }
 #endif
 
-void
+char*
 message_send_private(const char *const fulljid, const char *const msg, const char *const oob_url)
 {
     xmpp_ctx_t * const ctx = connection_get_ctx();
@@ -517,14 +517,14 @@ message_send_private(const char *const fulljid, const char *const msg, const cha
     xmpp_stanza_t *message = xmpp_message_new(ctx, STANZA_TYPE_CHAT, fulljid, id);
     xmpp_message_set_body(message, msg);
 
-    free(id);
-
     if (oob_url) {
         stanza_attach_x_oob_url(ctx, message, oob_url);
     }
 
     _send_message_stanza(message);
     xmpp_stanza_release(message);
+
+    return id;
 }
 
 char*
ef='#n169'>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