diff options
author | Joan Touzet <joant@atypical.net> | 2018-03-13 20:13:45 -0400 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2018-03-14 08:07:44 +0100 |
commit | 826c46be02e471433a1712edc29bbfc4355d4c08 (patch) | |
tree | 93d49c3d80d23bf13c8171dae3d20c2cb94aee68 | |
parent | 787f8c019d68b10bed01dc2dc6240f8ef052c5f5 (diff) | |
download | wee-slack-826c46be02e471433a1712edc29bbfc4355d4c08.tar.gz |
Fix self-nick color in messages
-rw-r--r-- | wee_slack.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wee_slack.py b/wee_slack.py index 0e0ae71..d0b4cea 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2009,12 +2009,11 @@ class SlackMessage(object): name_plain = "" if 'user' in self.message_json: if self.message_json['user'] == self.team.myidentifier: - name = self.team.users[self.team.myidentifier].name - name_plain = self.team.users[self.team.myidentifier].name + u = self.team.users[self.team.myidentifier] elif self.message_json['user'] in self.team.users: u = self.team.users[self.message_json['user']] - name = "{}".format(u.formatted_name()) - name_plain = "{}".format(u.formatted_name(enable_color=False)) + name = "{}".format(u.formatted_name()) + name_plain = "{}".format(u.formatted_name(enable_color=False)) elif 'username' in self.message_json: u = self.message_json["username"] if self.message_json.get("subtype") == "bot_message": |