summaryrefslogtreecommitdiff
path: root/plugins/lastlog.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/lastlog.py')
-rw-r--r--plugins/lastlog.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/plugins/lastlog.py b/plugins/lastlog.py
index 104399b4..49efa522 100644
--- a/plugins/lastlog.py
+++ b/plugins/lastlog.py
@@ -17,7 +17,8 @@ from datetime import datetime
from poezio.plugin import BasePlugin
from poezio import tabs
-from poezio.text_buffer import Message, TextBuffer
+from poezio.text_buffer import TextBuffer
+from poezio.ui.types import InfoMessage
def add_line(
@@ -26,18 +27,7 @@ def add_line(
datetime: Optional[datetime] = None,
) -> None:
"""Adds a textual entry in the TextBuffer"""
- text_buffer.add_message(
- text,
- datetime, # Time
- None, # Nickname
- None, # Nick Color
- False, # History
- None, # User
- False, # Highlight
- None, # Identifier
- None, # str_time
- None, # Jid
- )
+ text_buffer.add_message(InfoMessage(text, time=datetime))
class Plugin(BasePlugin):