Skip to content

Commit 9ca2f15

Browse files
zaughonMartin Flygenring
andauthored
Update send_message data and allow changing certain things through msg.extras (#112) (#113)
* Update send_message data and allow changing certain things through msg.extras (#112) * Updated CHANGELOG for #112 --------- Co-authored-by: Martin Flygenring <maf@one.com>
1 parent 8e9b22b commit 9ca2f15

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
## [0.4.0] Unreleased
88
### Added
99
### Changed
10+
- Update send_message data and allow changing certain things through msg.extras (#112)"
1011
### Fixed
1112

1213
## [0.3.1] 2025-04-02

src/slackv3/slackv3.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,10 @@ def send_message(self, msg) -> Message:
738738
data = {
739739
"channel": to_channel_id,
740740
"text": part,
741-
"unfurl_media": "true",
742-
"link_names": "1",
743-
"as_user": "true",
741+
"unfurl_links": msg.extras.get('unfurl_links', True),
742+
"unfurl_media": msg.extras.get('unfurl_media', True),
743+
"link_names": msg.extras.get('link_names', True),
744+
"as_user": True,
744745
}
745746

746747
if index == len(parts) - 1:
@@ -780,9 +781,7 @@ def send_message(self, msg) -> Message:
780781
data = {
781782
"channel": to_channel_id,
782783
"ts": timestamp,
783-
"unfurl_media": "true",
784-
"link_names": "1",
785-
"as_user": "true",
784+
"as_user": True,
786785
}
787786
self.slack_web.chat_delete(**data)
788787

0 commit comments

Comments
 (0)