diff options
author | James Booth <boothj5@gmail.com> | 2012-07-22 21:44:59 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-07-22 21:44:59 +0100 |
commit | 310a1ff42da79646ffb245a47f16f4b54ca8c8fe (patch) | |
tree | 251bb0b0824622fca68ec1579d45009f9a4a90b5 /src | |
parent | 3212469bd8c9e08405665d74064938d398a4bdf1 (diff) | |
download | profani-tty-310a1ff42da79646ffb245a47f16f4b54ca8c8fe.tar.gz |
Formatting of jids in chat log
Diffstat (limited to 'src')
-rw-r--r-- | src/jabber.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/jabber.c b/src/jabber.c index d9d3827c..377965e2 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -166,8 +166,10 @@ void jabber_send(const char * const msg, const char * const recipient) free(coded_msg); free(coded_msg2); free(coded_msg3); + + const char *jid = xmpp_conn_get_jid(jabber_conn.conn); - chat_log_chat("me", msg); + chat_log_chat(jid, msg); } void jabber_roster_request(void) @@ -253,7 +255,11 @@ static int _jabber_message_handler(xmpp_conn_t * const conn, win_show_incomming_msg(from, message); win_page_off(); - chat_log_chat(from, message); + char from_cpy[strlen(from) + 1]; + strcpy(from_cpy, from); + char *short_from = strtok(from_cpy, "/"); + + chat_log_chat(short_from, message); return 1; } |