Software /
code /
prosody
Annotate
spec/scansion/muc_subject_issue_667.scs @ 13532:9970d333a63f
mod_pubsub: Use error registry
This is what util.error was made for!
This replaces the custom error stanza builder with common code in
util.stanza that knows enough about util.error and namespaced errors.
Some awkwardness remains in the way util.pubsub returns conflicting
form fields.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 27 Oct 2024 15:18:24 +0100 |
parent | 13414:d54364746a7c |
rev | line source |
---|---|
9685 | 1 # #667 MUC message with subject and body SHALL NOT be interpreted as a subject change |
2 | |
3 [Client] Romeo | |
4 password: password | |
5 jid: romeo@localhost | |
6 | |
7 ----- | |
8 | |
9 Romeo connects | |
10 | |
11 # and creates a room | |
12 Romeo sends: | |
13 <presence to="issue667@conference.localhost/Romeo"> | |
14 <x xmlns="http://jabber.org/protocol/muc"/> | |
15 </presence> | |
16 | |
17 Romeo receives: | |
18 <presence from="issue667@conference.localhost/Romeo"> | |
19 <x xmlns="http://jabber.org/protocol/muc#user"> | |
20 <status code="201"/> | |
21 <item affiliation="owner" role="moderator" jid="${Romeo's full JID}"/> | |
22 <status code="110"/> | |
23 </x> | |
24 </presence> | |
25 | |
9707
9171eddcce93
MUC: Add descriptive comments to #667 test
Kim Alvefur <zash@zash.se>
parents:
9706
diff
changeset
|
26 # the default (empty) subject |
9685 | 27 Romeo receives: |
28 <message type="groupchat" from="issue667@conference.localhost"> | |
29 <subject/> | |
30 </message> | |
31 | |
9707
9171eddcce93
MUC: Add descriptive comments to #667 test
Kim Alvefur <zash@zash.se>
parents:
9706
diff
changeset
|
32 # this should be treated as a normal message |
9685 | 33 Romeo sends: |
34 <message to="issue667@conference.localhost" type="groupchat"> | |
35 <subject>Greetings</subject> | |
36 <body>Hello everyone</body> | |
37 </message> | |
38 | |
39 Romeo receives: | |
40 <message type="groupchat" from="issue667@conference.localhost/Romeo"> | |
41 <subject>Greetings</subject> | |
42 <body>Hello everyone</body> | |
43 </message> | |
44 | |
13414
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
45 # this should be treated as a normal message |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
46 Romeo sends: |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
47 <message to="issue667@conference.localhost" type="groupchat"> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
48 <subject>New thread</subject> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
49 <thread>498acea5-5894-473f-b4c6-c77319d11c75</thread> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
50 <store xmlns="urn:xmpp:hints"/> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
51 </message> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
52 |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
53 Romeo receives: |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
54 <message type="groupchat" from="issue667@conference.localhost/Romeo"> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
55 <subject>New thread</subject> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
56 <thread>498acea5-5894-473f-b4c6-c77319d11c75</thread> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
57 <store xmlns="urn:xmpp:hints"/> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
58 </message> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
59 |
9708
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
60 # Resync |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
61 Romeo sends: |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
62 <presence to="issue667@conference.localhost/Romeo"> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
63 <x xmlns="http://jabber.org/protocol/muc"/> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
64 </presence> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
65 |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
66 # Presences |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
67 Romeo receives: |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
68 <presence from="issue667@conference.localhost/Romeo"> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
69 <x xmlns="http://jabber.org/protocol/muc#user"> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
70 <item affiliation="owner" role="moderator" jid="${Romeo's full JID}"/> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
71 <status code="110"/> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
72 </x> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
73 </presence> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
74 |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
75 Romeo receives: |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
76 <message type="groupchat" from="issue667@conference.localhost/Romeo"> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
77 <subject>Greetings</subject> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
78 <body>Hello everyone</body> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
79 </message> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
80 |
13414
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
81 Romeo receives: |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
82 <message type="groupchat" from="issue667@conference.localhost/Romeo"> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
83 <subject>New thread</subject> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
84 <thread>498acea5-5894-473f-b4c6-c77319d11c75</thread> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
85 <store xmlns="urn:xmpp:hints"/> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
86 </message> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
87 |
9708
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
88 # the still empty subject |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
89 Romeo receives: |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
90 <message type="groupchat" from="issue667@conference.localhost"> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
91 <subject/> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
92 </message> |
6507df6d2c55
MUC: Test that subject is still empty after sending a non-subject change message with a subject (#667)
Kim Alvefur <zash@zash.se>
parents:
9707
diff
changeset
|
93 |
9707
9171eddcce93
MUC: Add descriptive comments to #667 test
Kim Alvefur <zash@zash.se>
parents:
9706
diff
changeset
|
94 # this is a subject change |
9685 | 95 Romeo sends: |
96 <message to="issue667@conference.localhost" type="groupchat"> | |
97 <subject>Something to talk about</subject> | |
98 </message> | |
99 | |
100 Romeo receives: | |
101 <message type="groupchat" from="issue667@conference.localhost/Romeo"> | |
102 <subject>Something to talk about</subject> | |
103 </message> | |
104 | |
9707
9171eddcce93
MUC: Add descriptive comments to #667 test
Kim Alvefur <zash@zash.se>
parents:
9706
diff
changeset
|
105 # a message without <subject> |
9685 | 106 Romeo sends: |
9706
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
107 <message to="issue667@conference.localhost" type="groupchat"> |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
108 <body>Lorem ipsum dolor sit amet</body> |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
109 </message> |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
110 |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
111 Romeo receives: |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
112 <message type="groupchat" from="issue667@conference.localhost/Romeo"> |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
113 <body>Lorem ipsum dolor sit amet</body> |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
114 </message> |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
115 |
9707
9171eddcce93
MUC: Add descriptive comments to #667 test
Kim Alvefur <zash@zash.se>
parents:
9706
diff
changeset
|
116 # Resync |
9706
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
117 Romeo sends: |
9685 | 118 <presence to="issue667@conference.localhost/Romeo"> |
119 <x xmlns="http://jabber.org/protocol/muc"/> | |
120 </presence> | |
121 | |
9707
9171eddcce93
MUC: Add descriptive comments to #667 test
Kim Alvefur <zash@zash.se>
parents:
9706
diff
changeset
|
122 # Presences |
9685 | 123 Romeo receives: |
124 <presence from="issue667@conference.localhost/Romeo"> | |
125 <x xmlns="http://jabber.org/protocol/muc#user"> | |
126 <item affiliation="owner" role="moderator" jid="${Romeo's full JID}"/> | |
127 <status code="110"/> | |
128 </x> | |
129 </presence> | |
130 | |
9707
9171eddcce93
MUC: Add descriptive comments to #667 test
Kim Alvefur <zash@zash.se>
parents:
9706
diff
changeset
|
131 # History |
9685 | 132 # These have delay tags but we ignore those for now |
133 Romeo receives: | |
134 <message type="groupchat" from="issue667@conference.localhost/Romeo"> | |
135 <subject>Greetings</subject> | |
136 <body>Hello everyone</body> | |
137 </message> | |
138 | |
139 Romeo receives: | |
140 <message type="groupchat" from="issue667@conference.localhost/Romeo"> | |
13414
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
141 <subject>New thread</subject> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
142 <thread>498acea5-5894-473f-b4c6-c77319d11c75</thread> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
143 <store xmlns="urn:xmpp:hints"/> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
144 </message> |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
145 |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
146 Romeo receives: |
d54364746a7c
MUC: Test that <subject/> + <thread/> is not handled as subject change
Kim Alvefur <zash@zash.se>
parents:
9708
diff
changeset
|
147 <message type="groupchat" from="issue667@conference.localhost/Romeo"> |
9706
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
148 <body>Lorem ipsum dolor sit amet</body> |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
149 </message> |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
150 |
9707
9171eddcce93
MUC: Add descriptive comments to #667 test
Kim Alvefur <zash@zash.se>
parents:
9706
diff
changeset
|
151 # Finally, the topic |
9706
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
152 Romeo receives: |
d3c2c9248734
MUC: Add another message to #667 test
Kim Alvefur <zash@zash.se>
parents:
9685
diff
changeset
|
153 <message type="groupchat" from="issue667@conference.localhost/Romeo"> |
9685 | 154 <subject>Something to talk about</subject> |
155 </message> | |
156 | |
157 Romeo disconnects | |
158 |