mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 19:56:22 +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:
@@ -200,9 +200,8 @@ roster_set_handler(xmpp_stanza_t* const stanza)
|
||||
}
|
||||
|
||||
// if from attribute exists and it is not current users barejid, ignore push
|
||||
auto_char char* mybarejid = connection_get_barejid();
|
||||
const char* from = xmpp_stanza_get_from(stanza);
|
||||
if (from && (strcmp(from, mybarejid) != 0)) {
|
||||
if (from && (strcmp(from, connection_get_barejid()) != 0)) {
|
||||
log_warning("Received alleged roster push from: %s", from);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user