Bounce message corrections
On IRC it is confusing when an XMPP user "corrects" a message, but on the other side a new message is sent. To prevent spam and confusion, do not allow message corrections at all, and instead return an error if attempted. Fixes: #3436 Fixes: #3480
This commit is contained in:
committed by
mathieui
parent
5cb2802fd2
commit
9c92f7ce4a
@@ -0,0 +1,10 @@
|
||||
from scenarios import *
|
||||
|
||||
scenario = (
|
||||
scenarios.simple_channel_join.scenario,
|
||||
send_stanza("<message id='the-message-id' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' type='groupchat'><body>hello</body></message>"),
|
||||
expect_stanza("/message[@from='#foo%{irc_server_one}/{nick_one}'][@id='the-message-id'][@to='{jid_one}/{resource_one}'][@type='groupchat']/body[text()='hello']"),
|
||||
send_stanza("<message id='the-message-id-2' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}' type='groupchat'><body>hello</body><replace id='the-message-id' xmlns='urn:xmpp:message-correct:0'/></message>"),
|
||||
expect_stanza("/message[@from='#foo%{irc_server_one}'][@id='the-message-id-2'][@to='{jid_one}/{resource_one}'][@type='error']/error[@type='cancel']/stanza:feature-not-implemented",
|
||||
"/message[@from='#foo%{irc_server_one}'][@id='the-message-id-2'][@to='{jid_one}/{resource_one}'][@type='error']/error[@type='cancel']/stanza:text[text()='This room is mapped from IRC, which does not support message correction.']"),
|
||||
)
|
||||
Reference in New Issue
Block a user