about summary refs log tree commit diff stats
path: root/src/ui/buffer.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-03-09 13:37:01 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-03-09 13:37:01 +0100
commita23d4e4af7c10f6762577940a12983903bf4428d (patch)
tree1ae89be41cb7b9edd15a8cbcbf29abaa9dee7cc1 /src/ui/buffer.c
parent441e31984e7d609eda6a340fa391c6ad00bac5de (diff)
parent083ba7808d3ed8e77aeabfbe3f155681c36b80b3 (diff)
downloadprofani-tty-a23d4e4af7c10f6762577940a12983903bf4428d.tar.gz
Merge branch 'buffer-from'
Regards https://github.com/profanity-im/profanity/issues/805
Completes https://github.com/profanity-im/profanity/pull/1267

We now check who tries to "correct" a sent message.
Diffstat (limited to 'src/ui/buffer.c')
-rw-r--r--src/ui/buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/buffer.c b/src/ui/buffer.c
index c1d5e070..54178632 100644
--- a/src/ui/buffer.c
+++ b/src/ui/buffer.c
@@ -81,8 +81,7 @@ buffer_free(ProfBuff buffer)
 }
 
 void
-buffer_append(ProfBuff buffer, const char *show_char, int pad_indent, GDateTime *time,
-    int flags, theme_item_t theme_item, const char *const display_from, const char *const message, DeliveryReceipt *receipt, const char *const id)
+buffer_append(ProfBuff buffer, const char *show_char, int pad_indent, GDateTime *time, int flags, theme_item_t theme_item, const char *const display_from, const char *const from_jid, const char *const message, DeliveryReceipt *receipt, const char *const id)
 {
     ProfBuffEntry *e = malloc(sizeof(struct prof_buff_entry_t));
     e->show_char = strdup(show_char);
@@ -91,6 +90,7 @@ buffer_append(ProfBuff buffer, const char *show_char, int pad_indent, GDateTime
     e->theme_item = theme_item;
     e->time = g_date_time_ref(time);
     e->display_from = display_from ? strdup(display_from) : NULL;
+    e->from_jid = from_jid ? strdup(from_jid) : NULL;
     e->message = strdup(message);
     e->receipt = receipt;
     if (id) {
@@ -168,6 +168,7 @@ _free_entry(ProfBuffEntry *entry)
     free(entry->show_char);
     free(entry->message);
     free(entry->display_from);
+    free(entry->from_jid);
     free(entry->id);
     free(entry->receipt);
     g_date_time_unref(entry->time);