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
-------
d3807a79b8
[Notifier] Add SlackOptions::threadTs() to send message as reply
This commit is contained in:
commit
ef2da6c887
@ -8,6 +8,7 @@ CHANGELOG
|
|||||||
* Check for maximum number of buttons in Slack action block
|
* Check for maximum number of buttons in Slack action block
|
||||||
* Add HeaderBlock
|
* Add HeaderBlock
|
||||||
* Slack access tokens needs to start with "xox" (see https://api.slack.com/authentication/token-types)
|
* Slack access tokens needs to start with "xox" (see https://api.slack.com/authentication/token-types)
|
||||||
|
* Add `SlackOptions::threadTs()` to send message as reply
|
||||||
|
|
||||||
5.2.0
|
5.2.0
|
||||||
-----
|
-----
|
||||||
|
@ -181,4 +181,14 @@ final class SlackOptions implements MessageOptionsInterface
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function threadTs(string $threadTs): self
|
||||||
|
{
|
||||||
|
$this->options['thread_ts'] = $threadTs;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,7 @@ final class SlackOptionsTest extends TestCase
|
|||||||
yield [['unfurl_links' => true]];
|
yield [['unfurl_links' => true]];
|
||||||
yield [['unfurl_media' => true]];
|
yield [['unfurl_media' => true]];
|
||||||
yield [['username' => 'baz']];
|
yield [['username' => 'baz']];
|
||||||
|
yield [['thread_ts' => '1503435956.000247']];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -111,6 +112,7 @@ final class SlackOptionsTest extends TestCase
|
|||||||
yield ['unfurlLinks', 'unfurl_links', true];
|
yield ['unfurlLinks', 'unfurl_links', true];
|
||||||
yield ['unfurlMedia', 'unfurl_media', true];
|
yield ['unfurlMedia', 'unfurl_media', true];
|
||||||
yield ['username', 'username', 'baz'];
|
yield ['username', 'username', 'baz'];
|
||||||
|
yield ['threadTs', 'thread_ts', '1503435956.000247'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSetBlock()
|
public function testSetBlock()
|
||||||
|
Reference in New Issue
Block a user