summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMaxime Buquet <pep@bouah.net>2020-08-09 20:16:20 +0200
committerMaxime Buquet <pep@bouah.net>2020-08-09 20:16:20 +0200
commitf065fbaef99814c4035720ced86413c56b26315a (patch)
treecbca38835ed509dfedbbddee7588e8ad416b2380 /plugins
parent37cebbceb0f31726e2e7960db110e58b31bcae9e (diff)
parenta5b15eafe07a90eefec2ef63ead8bea3c96e0bc3 (diff)
downloadpoezio-f065fbaef99814c4035720ced86413c56b26315a.tar.gz
poezio-f065fbaef99814c4035720ced86413c56b26315a.tar.bz2
poezio-f065fbaef99814c4035720ced86413c56b26315a.tar.xz
poezio-f065fbaef99814c4035720ced86413c56b26315a.zip
Merge branch 'lastlog-uitypes' into 'master'
plugins/lastlog: adapt to use poezio.ui.types See merge request poezio/poezio!152
Diffstat (limited to 'plugins')
-rw-r--r--plugins/lastlog.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/lastlog.py b/plugins/lastlog.py
index 49efa522..70ea53c1 100644
--- a/plugins/lastlog.py
+++ b/plugins/lastlog.py
@@ -18,7 +18,7 @@ from datetime import datetime
from poezio.plugin import BasePlugin
from poezio import tabs
from poezio.text_buffer import TextBuffer
-from poezio.ui.types import InfoMessage
+from poezio.ui.types import Message as PMessage, InfoMessage
def add_line(
@@ -52,7 +52,7 @@ class Plugin(BasePlugin):
res = []
add_line(text_buffer, "Lastlog:")
for message in text_buffer.messages:
- if message.nickname is not None and \
+ if isinstance(message, PMessage) and \
search_re.search(message.txt) is not None:
res.append(message)
add_line(text_buffer, "%s> %s" % (message.nickname, message.txt), message.time)