From a1bea5b4dbe91578e7fa4c563080d4c8db6bdf47 Mon Sep 17 00:00:00 2001 From: diSabler Date: Sun, 30 Jul 2017 20:03:23 +0300 Subject: add: pinned messages in logs --- data/chatlog/.css/chatlog.css | 6 ++++++ plugins/logger.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/data/chatlog/.css/chatlog.css b/data/chatlog/.css/chatlog.css index af954b2..3d5b4ad 100644 --- a/data/chatlog/.css/chatlog.css +++ b/data/chatlog/.css/chatlog.css @@ -115,6 +115,12 @@ pre { white-space: pre; margin: 0px; color: #57a478; + font-size: 14px; +} + +.pinned { + color: #bd2d2d; + font-weight: bold; } .image { diff --git a/plugins/logger.py b/plugins/logger.py index da2453f..3dd6c21 100644 --- a/plugins/logger.py +++ b/plugins/logger.py @@ -144,6 +144,8 @@ def logger(raw_in): TEXT = '%s [Sticker]' % raw_in['message'].get('sticker',{}).get('emoji', '?') elif raw_in['message'].has_key('document'): TEXT = '📄 [Document]' + elif raw_in['message'].has_key('pinned_message'): + TEXT = '📌 %s' % raw_in['message'].get('pinned_message',{}).get('text', '-') else: IMG = raw_in['message'].get('photo', '') if IMG and type(IMG) == type(u''): -- cgit v1.2.3