diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2018-08-20 22:39:50 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2018-08-20 22:48:35 +0200 |
commit | bed3249086f7982281d3919b17c3ad74eff54b67 (patch) | |
tree | ee27cbc2f0f139680df2c36469599dc54fef2af9 /wee_slack.py | |
parent | e40779ebf92071cb466c1e1f35928139b7c98652 (diff) | |
download | wee-slack-bed3249086f7982281d3919b17c3ad74eff54b67.tar.gz |
Fix missing nick for own messages
This was introduced in commit 51c2e76 because I removed user from the
request believing it to be unnecessary.
I think the reason I didn't experience this problem after removing it
(I'm pretty sure I tested it), is that we might receive both a message
event and a request response for the message, and we use the first of
those that arrives. The message event will always contain the user,
while the request response will not (but it's passed along if provided
as in this commit).
Fixes #612
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index 899caec..f462e50 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1476,7 +1476,7 @@ class SlackChannel(object): self.eventrouter.receive(s) else: request = {"type": "message", "channel": self.identifier, - "text": message} + "text": message, "user": self.team.myidentifier} request.update(request_dict_ext) self.team.send_to_websocket(request) @@ -1969,7 +1969,8 @@ class SlackThreadChannel(object): dbg(message) request = {"type": "message", "text": message, "channel": self.parent_message.channel.identifier, - "thread_ts": str(self.parent_message.ts)} + "thread_ts": str(self.parent_message.ts), + "user": self.team.myidentifier} self.team.send_to_websocket(request) def open(self, update_remote=True): |