Introduce equals_our_barejid()
Instead of always repeating the same pattern, introduce a helper function. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
@@ -201,7 +201,7 @@ roster_set_handler(xmpp_stanza_t* const stanza)
|
||||
|
||||
// if from attribute exists and it is not current users barejid, ignore push
|
||||
const char* from = xmpp_stanza_get_from(stanza);
|
||||
if (from && (strcmp(from, connection_get_barejid()) != 0)) {
|
||||
if (!equals_our_barejid(from)) {
|
||||
log_warning("Received alleged roster push from: %s", from);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user