Software /
code /
prosody-modules
Comparison
mod_muc_inject_mentions/spec/scansion/mod_muc_inject_mentions.scs @ 4243:aed7038ab2ab
mod_muc_inject_mentions: Make module scalable by iterating through the body instead of participants list as the main loop
author | Seve Ferrer <seve@delape.net> |
---|---|
date | Sat, 14 Nov 2020 18:02:49 +0100 |
comparison
equal
deleted
inserted
replaced
4242:6a91d217acc9 | 4243:aed7038ab2ab |
---|---|
1 # mod_muc_inject_mentions | |
2 | |
3 [Client] Romeo | |
4 jid: romeo@example.org | |
5 password: 1234 | |
6 | |
7 ----- | |
8 | |
9 Romeo connects | |
10 | |
11 Romeo sends: | |
12 <presence to='room@chat.example.org/Romeo'> | |
13 <x xmlns='http://jabber.org/protocol/muc'/> | |
14 </presence> | |
15 | |
16 Romeo receives: | |
17 <presence from='room@chat.example.org/Romeo'> | |
18 <x xmlns='vcard-temp:x:update'> | |
19 <photo xmlns='vcard-temp:x:update'/> | |
20 </x> | |
21 <x xmlns='http://jabber.org/protocol/muc#user'> | |
22 <status code='201'/> | |
23 <item jid="${Romeo's full JID}" affiliation='owner' role='moderator'/> | |
24 <status code='110'/> | |
25 </x> | |
26 </presence> | |
27 | |
28 Romeo sends: | |
29 <iq from="${Romeo's full JID}" | |
30 id='muc_register1' | |
31 to='room@chat.example.org' | |
32 type='set'> | |
33 <query xmlns='jabber:iq:register'> | |
34 <x xmlns='jabber:x:data' type='submit'> | |
35 <field var='FORM_TYPE'> | |
36 <value>http://jabber.org/protocol/muc#register</value> | |
37 </field> | |
38 <field var='muc#register_roomnick'> | |
39 <value>Romeo</value> | |
40 </field> | |
41 </x> | |
42 </query> | |
43 </iq> | |
44 | |
45 Romeo receives: | |
46 # <iq from='room@chat.example.org' | |
47 # id='muc_register1' | |
48 # to="{Romeo's full JID}" | |
49 # type='result'/> | |
50 <presence from='room@chat.example.org/Romeo' to="${Romeo's full JID}"> | |
51 <x xmlns='vcard-temp:x:update'> | |
52 <photo xmlns='vcard-temp:x:update'/> | |
53 </x> | |
54 <x xmlns='http://jabber.org/protocol/muc#user'> | |
55 <item affiliation='owner' xmlns='http://jabber.org/protocol/muc#user' role='moderator' jid="${Romeo's full JID}"/> | |
56 <status code='110' xmlns='http://jabber.org/protocol/muc#user'/> | |
57 </x> | |
58 </presence> | |
59 | |
60 | |
61 Romeo sends: | |
62 <message from="${Romeo's full JID}" id='mentions1' to='room@chat.example.org' type='groupchat'> | |
63 <body> | |
64 Hey Romeo how are you doing Romeo? Good To see you Romeo! | |
65 Romeo is very nice! | |
66 So Romeo is Romeo and I am not Romeo | |
67 Romeo! | |
68 !Romeo | |
69 Romeo | |
70 Haha !Romeo | |
71 @Romeo haha | |
72 You are awesome Romeo! | |
73 </body> | |
74 </message> | |
75 | |
76 Romeo receives: | |
77 <message to="${Romeo's full JID}" id='mentions1' type='groupchat' from='room@chat.example.org/Romeo'> | |
78 <body> | |
79 Hey Romeo how are you doing Romeo? Good To see you Romeo! Romeo is very nice! So Romeo is Romeo and I am not Romeo Romeo! !Romeo Romeo Haha !Romeo @Romeo haha You are awesome Romeo! | |
80 </body> | |
81 <reference begin='8' end='12' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
82 <reference begin='32' end='36' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
83 <reference begin='55' end='59' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
84 <reference begin='65' end='69' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
85 <reference begin='91' end='95' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
86 <reference begin='100' end='104' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
87 <reference begin='119' end='123' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
88 <reference begin='128' end='132' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
89 <reference begin='148' end='152' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
90 <reference begin='173' end='177' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
91 <reference begin='203' end='207' xmlns='urn:xmpp:reference:0' type='mention' uri='xmpp:romeo@example.org'/> | |
92 </message> |