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

github.com/isida/vi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiSabler <dissy@ya.ru>2017-07-30 20:03:23 +0300
committerdiSabler <dissy@ya.ru>2017-07-30 20:03:23 +0300
commita1bea5b4dbe91578e7fa4c563080d4c8db6bdf47 (patch)
treef9146f5466d6c35e4adc5acf0141786a92d141f0
parentbf09eb2abe510b634ab0b3911d40aa7dd77a7ee2 (diff)
add: pinned messages in logs
-rw-r--r--data/chatlog/.css/chatlog.css6
-rw-r--r--plugins/logger.py2
2 files changed, 8 insertions, 0 deletions
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 = '📌 <span class="pinned">%s</span>' % raw_in['message'].get('pinned_message',{}).get('text', '-')
else:
IMG = raw_in['message'].get('photo', '')
if IMG and type(IMG) == type(u''):