1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-29 19:56:07 -04:00

Formatting of jids in chat log

This commit is contained in:
James Booth 2012-07-22 21:44:59 +01:00
parent 3212469bd8
commit 310a1ff42d

View File

@ -167,7 +167,9 @@ void jabber_send(const char * const msg, const char * const recipient)
free(coded_msg2); free(coded_msg2);
free(coded_msg3); free(coded_msg3);
chat_log_chat("me", msg); const char *jid = xmpp_conn_get_jid(jabber_conn.conn);
chat_log_chat(jid, msg);
} }
void jabber_roster_request(void) 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_show_incomming_msg(from, message);
win_page_off(); 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; return 1;
} }