mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 22:16:20 +00:00
message: simplify _handle_conference
This commit is contained in:
@@ -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);
|
xmpp_stanza_t* xns_conference = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_CONFERENCE);
|
||||||
|
|
||||||
if (xns_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);
|
const char* from = xmpp_stanza_get_from(stanza);
|
||||||
if (!from) {
|
if (!from) {
|
||||||
@@ -949,13 +954,6 @@ _handle_conference(xmpp_stanza_t* const stanza)
|
|||||||
return;
|
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
|
// reason and password are both optional
|
||||||
const char* reason = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_REASON);
|
const char* reason = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_REASON);
|
||||||
const char* password = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_PASSWORD);
|
const char* password = xmpp_stanza_get_attribute(xns_conference, STANZA_ATTR_PASSWORD);
|
||||||
|
|||||||
Reference in New Issue
Block a user