Skip to content

Commit 5476fa1

Browse files
committed
Restoring as_user to maintain consistency for classic Slack bots
1 parent d1835bc commit 5476fa1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

octoprint_Octoslack/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3458,12 +3458,18 @@ def send_slack_message(
34583458
)
34593459
else:
34603460
apiRsp = slackAPIConnection.chat.post_message(
3461-
channel, text="", attachments=attachments_json
3461+
channel,
3462+
as_user=True,
3463+
text="",
3464+
attachments=attachments_json,
34623465
)
34633466
self._bot_progress_last_req = apiRsp
34643467
else:
34653468
apiRsp = slackAPIConnection.chat.post_message(
3466-
channel, text="", attachments=attachments_json
3469+
channel,
3470+
as_user=True,
3471+
text="",
3472+
attachments=attachments_json,
34673473
)
34683474
self._logger.debug(
34693475
"Slack API message send response: " + apiRsp.raw

0 commit comments

Comments
 (0)