mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 18:56:21 +00:00
add connection_get_jid()
Use a singleton `Jid` inside the connection instead of always re-creating a `Jid` from the same string. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
@@ -86,8 +86,7 @@ cl_ev_connect_account(ProfAccount* account)
|
||||
void
|
||||
cl_ev_disconnect(void)
|
||||
{
|
||||
auto_char char* mybarejid = connection_get_barejid();
|
||||
cons_show("%s logged out successfully.", mybarejid);
|
||||
cons_show("%s logged out successfully.", connection_get_barejid());
|
||||
|
||||
ui_close_all_wins();
|
||||
ev_disconnect_cleanup();
|
||||
|
||||
@@ -630,8 +630,7 @@ sv_ev_incoming_message(ProfMessage* message)
|
||||
char* looking_for_jid = message->from_jid->barejid;
|
||||
|
||||
if (message->is_mam) {
|
||||
auto_char char* mybarejid = connection_get_barejid();
|
||||
if (g_strcmp0(mybarejid, message->from_jid->barejid) == 0) {
|
||||
if (g_strcmp0(connection_get_barejid(), message->from_jid->barejid) == 0) {
|
||||
if (message->to_jid) {
|
||||
looking_for_jid = message->to_jid->barejid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user