mirror of
https://github.com/paul-nameless/tg
synced 2024-11-25 05:10:22 +00:00
Add <secret> chat flag (#121)
This commit is contained in:
parent
e078199798
commit
aeab7c1564
2 changed files with 4 additions and 0 deletions
|
@ -135,6 +135,7 @@ CHAT_FLAGS = {
|
|||
"unread": "U",
|
||||
# last msg haven't been seen by recipient
|
||||
"unseen": "✓",
|
||||
"secret": "🔒",
|
||||
}
|
||||
MSG_FLAGS = {
|
||||
"selected": "*",
|
||||
|
|
|
@ -261,6 +261,9 @@ class ChatView:
|
|||
elif chat["unread_count"]:
|
||||
flags.append(str(chat["unread_count"]))
|
||||
|
||||
if get_chat_type(chat) == ChatType.chatTypeSecret:
|
||||
flags.append("secret")
|
||||
|
||||
label = " ".join(config.CHAT_FLAGS.get(flag, flag) for flag in flags)
|
||||
if label:
|
||||
return f" {label}"
|
||||
|
|
Loading…
Reference in a new issue