Redirect welcome NOTICE to their channel, instead of sending a global one

fix #3236
This commit is contained in:
louiz’
2017-05-17 00:31:21 +02:00
parent 0180ea7e40
commit bb150d587f
3 changed files with 25 additions and 1 deletions
+13
View File
@@ -1114,6 +1114,19 @@ if __name__ == '__main__':
),
partial(expect_stanza, "/message[@from='#bar%{irc_server_one}'][@type='groupchat'][@to='{jid_one}/{resource_one}']/subject[not(text())]"),
]),
Scenario("notices",
[
handshake_sequence(),
partial(send_stanza,
"<presence from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}/{nick_one}' />"),
connection_sequence("irc.localhost", '{jid_one}/{resource_one}'),
partial(expect_stanza, "/message"),
partial(expect_stanza, "/presence"),
partial(expect_stanza, "/message"),
partial(send_stanza, "<message from='{jid_one}/{resource_one}' to='{irc_server_one}' type='chat'><body>NOTICE {nick_one} :[#foo] Hello in a notice.</body></message>"),
partial(expect_stanza, "/message[@from='#foo%{irc_server_one}/{nick_one}'][@type='groupchat']/body[text()='[notice] [#foo] Hello in a notice.']"),
]),
Scenario("channel_messages",
[
handshake_sequence(),