summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2022-08-21 10:17:09 +0200
committerxengineering <me@xengineering.eu>2022-08-21 10:17:09 +0200
commita036f4b00cb0c2a7e6c070667ac562f0e585c7e4 (patch)
treec0bf41ec0d3728c7d4c4b5314b664c91f431b156 /data.c
parent3a20726b2679f9d5966156d83aac782de8234732 (diff)
downloadlimox-a036f4b00cb0c2a7e6c070667ac562f0e585c7e4.tar
limox-a036f4b00cb0c2a7e6c070667ac562f0e585c7e4.tar.zst
limox-a036f4b00cb0c2a7e6c070667ac562f0e585c7e4.zip
Implement correct recipient for send_message()
Diffstat (limited to 'data.c')
-rw-r--r--data.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/data.c b/data.c
index afa4616..7645679 100644
--- a/data.c
+++ b/data.c
@@ -22,6 +22,8 @@ void data_add_roster_item(const char* jid, const char* subscription,
// initialize chat
chat->messages = NULL;
+ chat->jid = malloc(sizeof(char)*strlen(jid));
+ strcpy(chat->jid, jid);
gui_add_chat_widget(chat);
// initialize roster item
@@ -63,6 +65,7 @@ void data_add_roster_item(const char* jid, const char* subscription,
void data_add_incoming_message(const char* sender_jid, const char* content) {
+ // TODO rework based on chat->jid
// find correct chat
chat_t* chat = NULL;
roster_item_t* i;
@@ -95,4 +98,7 @@ void data_add_incoming_message(const char* sender_jid, const char* content) {
// append message to chat
m = msg;
+ // TODO could be more correct to update chat->jid to full JID of just
+ // received message so that future responses go to this ressource
+
}