Fix the order of from and to address in muc traffic info reply

And add a test for it.

fix #3238
This commit is contained in:
louiz’
2017-03-04 14:03:08 +01:00
parent e6e37a6f20
commit d81c3ad5ac
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -738,7 +738,7 @@ void BiboumiComponent::send_irc_server_disco_info(const std::string& id, const s
this->send_stanza(iq);
}
void BiboumiComponent::send_irc_channel_muc_traffic_info(const std::string id, const std::string& jid_from, const std::string& jid_to)
void BiboumiComponent::send_irc_channel_muc_traffic_info(const std::string id, const std::string& jid_to, const std::string& jid_from)
{
Stanza iq("iq");
{
+1 -1
View File
@@ -69,7 +69,7 @@ public:
* Sends the allowed namespaces in MUC message, according to
* http://xmpp.org/extensions/xep-0045.html#impl-service-traffic
*/
void send_irc_channel_muc_traffic_info(const std::string id, const std::string& jid_from, const std::string& jid_to);
void send_irc_channel_muc_traffic_info(const std::string id, const std::string& jid_to, const std::string& jid_from);
/**
* Send a ping request
*/
+1 -1
View File
@@ -1864,7 +1864,7 @@ if __name__ == '__main__':
partial(send_stanza,
"<iq from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' id='1' type='get'><query xmlns='http://jabber.org/protocol/disco#info' node='http://jabber.org/protocol/muc#traffic'/></iq>"),
partial(expect_stanza, "/iq[@type='result']/disco_info:query[@node='http://jabber.org/protocol/muc#traffic']"),
partial(expect_stanza, "/iq[@from='#foo%{irc_server_one}'][@to='{jid_one}/{resource_one}'][@type='result']/disco_info:query[@node='http://jabber.org/protocol/muc#traffic']"),
]),
Scenario("raw_message",
[