Skip to content

Commit

Permalink
message['events'][0]['message'] valeus are str
Browse files Browse the repository at this point in the history
  • Loading branch information
takano32 committed Feb 18, 2024
1 parent 1b0cfa1 commit 7abe078
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sun.py
Original file line number Diff line number Diff line change
Expand Up @@ -1351,11 +1351,11 @@ def parse_slack_outgoing_webhooks(self, http_body):
self.message["events"][0]["message"] = {}
self.message["events"][0]["message"]["id"] = -1
self.message["events"][0]["message"]["type"] = "user"
self.message["events"][0]["message"]["speaker_id"] = params.get("user_name")
self.message["events"][0]["message"]["nickname"] = params.get("user_name")
self.message["events"][0]["message"]["text"] = params.get("text")
self.message["events"][0]["message"]["room"] = params.get("team_domain")
self.message["events"][0]["message"]["slack_channel"] = params.get("channel_name") # extra
self.message["events"][0]["message"]["speaker_id"] = str(params.get("user_name"))
self.message["events"][0]["message"]["nickname"] = str(params.get("user_name"))
self.message["events"][0]["message"]["text"] = str(params.get("text"))
self.message["events"][0]["message"]["room"] = str(params.get("team_domain"))
self.message["events"][0]["message"]["slack_channel"] = str(params.get("channel_name")) # extra
d = datetime.datetime.fromtimestamp(float(params.get("timestamp"))).isoformat()
self.message["events"][0]["message"]["timestamp"] = d + 'Z'

Expand Down

0 comments on commit 7abe078

Please sign in to comment.