Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-07-13 21:09:26 +0300
committerlovetox <philipp@hoerist.com>2022-07-13 21:09:26 +0300
commitd4eb4a35c696599258c098460087505878b9fd76 (patch)
tree752c476d01c4806c38ce5e3b77f2fbd6a1e9a5e7 /test
parent9aa42d7826e1ac336eee5bef7d67c2c2b7446ccc (diff)
fix: GroupchatInfo: Don’t set subject when loading from disco info
Disco provides only the subject text not the author and timestamp. It’s better to set this info separately when we receive the subject from the MUC. This has the drawback that we can’t show the subject when we only show the disco (StartChatDialog). But everything else would bring alot more complexity than it’s worth. Fixes #11040
Diffstat (limited to 'test')
-rw-r--r--test/gtk/groupchat_info.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/gtk/groupchat_info.py b/test/gtk/groupchat_info.py
index 5d79ac59d..d778a0294 100644
--- a/test/gtk/groupchat_info.py
+++ b/test/gtk/groupchat_info.py
@@ -6,6 +6,7 @@ from gi.repository import Gtk
from nbxmpp.protocol import Iq
from nbxmpp.modules.discovery import parse_disco_info
+from nbxmpp.structs import MucSubject
from gajim.common.const import CSSPriority
@@ -86,6 +87,10 @@ stanza = Iq(node='''
</query>
</iq>''')
+
+subject = ('Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed '
+ 'diam nonumy eirmod tempor invidunt ut labore et dolore magna')
+
disco_info = parse_disco_info(stanza)
class GroupchatInfo(Gtk.ApplicationWindow):
@@ -107,10 +112,9 @@ class GroupchatInfo(Gtk.ApplicationWindow):
self.add(self._main_box)
self._muc_info_box.set_from_disco_info(disco_info)
- self._muc_info_box.set_subject(
- 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed '
- 'diam nonumy eirmod tempor invidunt ut labore et dolore magna')
- self._muc_info_box.set_author('userX', None)
+ self._muc_info_box.set_subject(MucSubject(text=subject,
+ author='someone',
+ timestamp=None))
self.show_all()