aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-04-12 23:55:56 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2018-04-13 00:12:47 +0200
commit4877311eb2bc2f2af008e016937d0b8d495dd4c3 (patch)
treee9ab49deecb3cdcaeb7b61ac02b6049064fe0275
parentafc942561c688e32131f156b714a5240b2e1c13f (diff)
downloadwee-slack-4877311eb2bc2f2af008e016937d0b8d495dd4c3.tar.gz
Include real name in dm channel topic
-rw-r--r--wee_slack.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index b697fe3..e20b357 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2846,9 +2846,13 @@ def resolve_ref(ref):
def create_user_status_string(profile):
+ real_name = profile.get("real_name")
status_emoji = profile.get("status_emoji")
status_text = profile.get("status_text")
- return "[{}] {}".format(status_emoji, status_text)
+ if status_emoji or status_text:
+ return "{} | {} {}".format(real_name, status_emoji, status_text)
+ else:
+ return real_name
def create_reaction_string(reactions):