mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
message: simplify _handle_conference
This commit is contained in:
parent
2601fc5571
commit
ca9c946ddc
@ -937,6 +937,11 @@ _handle_conference(xmpp_stanza_t* const stanza)
|
||||
xmpp_stanza_t* xns_conference = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_CONFERENCE);
|
||||
|
||||
if (xns_conference) {
|
||||
// XEP-0249
|
||||
const char* room = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_JID);
|
||||
if (!room) {
|
||||
return;
|
||||
}
|
||||
|
||||
const char* from = xmpp_stanza_get_from(stanza);
|
||||
if (!from) {
|
||||
@ -949,13 +954,6 @@ _handle_conference(xmpp_stanza_t* const stanza)
|
||||
return;
|
||||
}
|
||||
|
||||
// XEP-0249
|
||||
const char* room = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_JID);
|
||||
if (!room) {
|
||||
jid_destroy(jidp);
|
||||
return;
|
||||
}
|
||||
|
||||
// reason and password are both optional
|
||||
const char* reason = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_REASON);
|
||||
const char* password = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_PASSWORD);
|
||||
|
Loading…
Reference in New Issue
Block a user