summaryrefslogtreecommitdiff
path: root/poezio/ui/types.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-05-23 16:38:05 +0200
committermathieui <mathieui@mathieui.net>2020-05-23 16:38:05 +0200
commite48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1 (patch)
tree534654be974749c2f4ea0bc99451fb8da5c61843 /poezio/ui/types.py
parent4c1ab027ac03ae3f0925eab03f43a5ad79d906d5 (diff)
parentfaeab78c7e3c9f125cfbfe3dce0fb18c9b8649c4 (diff)
downloadpoezio-e48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1.tar.gz
poezio-e48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1.tar.bz2
poezio-e48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1.tar.xz
poezio-e48780ddf0a6a80e0c36eaa8f8165c8d14ad63b1.zip
Merge branch 'fix-history-fetch' into 'master'
Fix many MAM issues Closes #3516, #3496, #3498, #3506, #3522, and #3493 See merge request poezio/poezio!105
Diffstat (limited to 'poezio/ui/types.py')
-rw-r--r--poezio/ui/types.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/poezio/ui/types.py b/poezio/ui/types.py
index ae72b6b9..15117275 100644
--- a/poezio/ui/types.py
+++ b/poezio/ui/types.py
@@ -12,6 +12,7 @@ from poezio.ui.consts import (
)
+
class BaseMessage:
__slots__ = ('txt', 'time', 'identifier')
@@ -27,12 +28,24 @@ class BaseMessage:
return SHORT_FORMAT_LENGTH + 1
+class EndOfArchive(BaseMessage):
+ """Marker added to a buffer when we reach the end of a MAM archive"""
+
+
class InfoMessage(BaseMessage):
def __init__(self, txt: str, identifier: str = '', time: Optional[datetime] = None):
txt = ('\x19%s}' % dump_tuple(get_theme().COLOR_INFORMATION_TEXT)) + txt
super().__init__(txt=txt, identifier=identifier, time=time)
+class MucOwnLeaveMessage(InfoMessage):
+ """Status message displayed on our room leave/kick/ban"""
+
+
+class MucOwnJoinMessage(InfoMessage):
+ """Status message displayed on our room join"""
+
+
class XMLLog(BaseMessage):
"""XML Log message"""
__slots__ = ('txt', 'time', 'identifier', 'incoming')