-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle mediated muc invites that include legacy reason.
- Loading branch information
Showing
12 changed files
with
214 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
test/protocol-cases/xep0045/mediated-invite-legacy-reason.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
[ | ||
"message", | ||
{ | ||
"body": "admin@domain/QfQz53QX invited you to the room call-rb8j8seq@conference.quobis (You've been added to the conference's chat room)", | ||
"from": "call-rb8j8seq@conference.domain", | ||
"id": "4fd708bd0eb29b7e", | ||
"legacyMUC": { | ||
"jid": "call-rb8j8seq@domain.quobis", | ||
"legacyReason": "You've been added to the conference's chat room" | ||
}, | ||
"muc": { | ||
"invite": [ | ||
{ | ||
"from": "admin@domain/QfQz53QX", | ||
"reason": "You've been added to the conference's chat room" | ||
} | ||
] | ||
}, | ||
"stanzaIds": [ | ||
{ | ||
"by": "dev6@domain", | ||
"id": "1dHg6QfzhDdy2oXP" | ||
} | ||
], | ||
"to": "dev6@domain" | ||
}, | ||
{ | ||
"alternateLanguageBodies": [ | ||
{ | ||
"lang": "", | ||
"value": "admin@domain/QfQz53QX invited you to the room call-rb8j8seq@conference.quobis (You've been added to the conference's chat room)" | ||
} | ||
], | ||
"body": "admin@domain/QfQz53QX invited you to the room call-rb8j8seq@conference.quobis (You've been added to the conference's chat room)", | ||
"from": "call-rb8j8seq@conference.domain", | ||
"id": "4fd708bd0eb29b7e", | ||
"lang": "", | ||
"legacyMUC": { | ||
"action": "invite", | ||
"legacyReason": "You've been added to the conference's chat room", | ||
"jid": "call-rb8j8seq@domain.quobis", | ||
"type": "direct-invite" | ||
}, | ||
"muc": { | ||
"action": "invite", | ||
"invite": [ | ||
{ | ||
"from": "admin@domain/QfQz53QX", | ||
"reason": "You've been added to the conference's chat room" | ||
} | ||
], | ||
"statusCodes": [] | ||
}, | ||
"stanzaIds": [ | ||
{ | ||
"by": "dev6@domain", | ||
"id": "1dHg6QfzhDdy2oXP" | ||
} | ||
], | ||
"to": "dev6@domain" | ||
} | ||
] |
10 changes: 10 additions & 0 deletions
10
test/protocol-cases/xep0045/mediated-invite-legacy-reason.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<message id="4fd708bd0eb29b7e" to="dev6@domain" xmlns="jabber:client" from="call-rb8j8seq@conference.domain"> | ||
<body>admin@domain/QfQz53QX invited you to the room call-rb8j8seq@conference.quobis (You've been added to the conference's chat room)</body> | ||
<x xmlns="http://jabber.org/protocol/muc#user"> | ||
<invite from="admin@domain/QfQz53QX"> | ||
<reason>You've been added to the conference's chat room</reason> | ||
</invite> | ||
</x> | ||
<stanza-id id="1dHg6QfzhDdy2oXP" xmlns="urn:xmpp:sid:0" by="dev6@domain" /> | ||
<x xmlns="jabber:x:conference" jid="call-rb8j8seq@domain.quobis">You've been added to the conference's chat room</x> | ||
</message> |
34 changes: 34 additions & 0 deletions
34
test/protocol-cases/xep0045/private-message-direct-invite.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[ | ||
"message", | ||
{ | ||
"from": "crone1@shakespeare.lit/desktop", | ||
"legacyMUC": { | ||
"action": "invite", | ||
"continue": true, | ||
"jid": "darkcave@macbeth.shakespeare.lit", | ||
"password": "cauldronburn", | ||
"reason": "Hey Hecate, this is the place for all good witches!", | ||
"thread": "e0ffe42b28561960c6b12b944a092794b9683a38", | ||
"type": "direct-invite" | ||
}, | ||
"muc": {}, | ||
"to": "hecate@shakespeare.lit" | ||
}, | ||
{ | ||
"from": "crone1@shakespeare.lit/desktop", | ||
"lang": "", | ||
"legacyMUC": { | ||
"action": "invite", | ||
"continue": true, | ||
"jid": "darkcave@macbeth.shakespeare.lit", | ||
"password": "cauldronburn", | ||
"reason": "Hey Hecate, this is the place for all good witches!", | ||
"thread": "e0ffe42b28561960c6b12b944a092794b9683a38", | ||
"type": "direct-invite" | ||
}, | ||
"muc": { | ||
"statusCodes": [] | ||
}, | ||
"to": "hecate@shakespeare.lit" | ||
} | ||
] |
11 changes: 11 additions & 0 deletions
11
test/protocol-cases/xep0045/private-message-direct-invite.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<message | ||
from='crone1@shakespeare.lit/desktop' | ||
to='hecate@shakespeare.lit'> | ||
<x xmlns="http://jabber.org/protocol/muc#user" /> | ||
<x xmlns='jabber:x:conference' | ||
continue='1' | ||
jid='darkcave@macbeth.shakespeare.lit' | ||
password='cauldronburn' | ||
reason='Hey Hecate, this is the place for all good witches!' | ||
thread='e0ffe42b28561960c6b12b944a092794b9683a38'/> | ||
</message> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ | ||
"message", | ||
{ | ||
"from": "test@muc.example.com", | ||
"lang": "", | ||
"muc": { | ||
"statusCodes": ["104"] | ||
}, | ||
"to": "user@example.net/conn1", | ||
"type": "groupchat" | ||
} | ||
] |
Oops, something went wrong.