8000 feature #40992 [Notifier] Add SlackOptions::threadTs() to send messag… · symfony/symfony@ef2da6c · GitHub
[go: up one dir, main page]

Skip to content

Commit ef2da6c

Browse files
feature #40992 [Notifier] Add SlackOptions::threadTs() to send message as reply (WaylandAce)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Notifier] Add SlackOptions::threadTs() to send message as reply | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | no | License | MIT | Doc PR | no Allow specify argument [thread_ts](https://api.slack.com/methods/chat.postMessage#arg_thread_ts) to send reply message. Commits ------- d3807a7 [Notifier] Add SlackOptions::threadTs() to send message as reply
2 parents 18e6e2d + d3807a7 commit ef2da6c

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/Symfony/Component/Notifier/Bridge/Slack/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CHANGELOG
88
* Check for maximum number of buttons in Slack action block
99
* Add HeaderBlock
1010
* Slack access tokens needs to start with "xox" (see https://api.slack.com/authentication/token-types)
11+
* Add `SlackOptions::threadTs()` to send message as reply
1112

1213
5.2.0
1314
-----

src/Symfony/Component/Notifier/Bridge/Slack/SlackOptions.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,14 @@ public function username(string $username): self
181181

182182
return $this;
183183
}
184+
185+
/**
186+
* @return $this
187+
*/
188+
public function threadTs(string $threadTs): self
189+
{
190+
$this->options['thread_ts'] = $threadTs;
191+
192+
return $this;
193+
}
184194
}

src/Symfony/Component/Notifier/Bridge/Slack/Tests/SlackOptionsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public function toArraySimpleOptionsProvider(): iterable
7070
yield [['unfurl_links' => true]];
7171
yield [['unfurl_media' => true]];
7272
yield [['username' => 'baz']];
73+
yield [['thread_ts' => '1503435956.000247']];
7374
}
7475

7576
/**
@@ -111,6 +112,7 @@ public function setProvider(): iterable
111112
yield ['unfurlLinks', 'unfurl_links', true];
112113
yield ['unfurlMedia', 'unfurl_media', true];
113114
yield ['username', 'username', 'baz'];
115+
yield ['threadTs', 'thread_ts', '1503435956.000247'];
114116
}
115117

116118
public function testSetBlock()

0 commit comments

Comments
 (0)
0