jjaffeux
d483f4ae5a
DEV: s/JSON.parse(response.body)/response.parsed_body
2020-09-25 20:47:30 +02:00
David Taylor
bdca153a09
FIX: Send new topic Slack notifications to the correct thread
...
This applies when topics are created using the slack transcript feature, and there is a rule configured with filter=thread
2020-08-14 19:15:02 +01:00
Guo Xiang Tan
424c477043
Make rubocop happy.
2020-06-17 15:45:10 +08:00
Michael K Johnson
da9106127a
FEATURE: Enable optional support for threading slack posts ( #38 )
...
When creating a new Discourse post from slack with the `post` feature, record the
slack `ts` thread ID for the resulting topic post using an HTML comment to pass
the `ts` through.
When notifying slack of new Discourse posts, record the slack `ts` thread ID in
the post's topic if it has not yet been recorded. (Normally, this will be done
for the topic post, except where notifications are being posted for old topics
before this feature was created.)
Add a new rule filter `thread` which posts threaded responses to slack if there
is a `ts` recorded for the post topic.
Modify the `trigger_notifications` interface to enable other integrations to
implement similar functionality.
Present the `thread` rule in the help text and admin UI only for the slack
providers.
https://meta.discourse.org/t/optionally-threading-posts-to-parent-topic-in-slack-integration/150759
2020-06-15 16:45:25 +01:00
Penar Musaraj
6fcf381751
Rubocop redundant return fix
2019-11-14 15:03:49 -05:00
David Taylor
7e5dc5acc1
FIX: Allow slash commands to set rules in private groups
...
The Slack 'slash commands' API does not provide the user-friendly group name, so we must use the group ID. We could use the API to obtain the group name, but it would require adding additional scopes to the app.
2019-09-30 13:27:35 +01:00
Raimundo Herrera
695d56a3dd
FEATURE: support for slack custom username ( #22 )
...
* FEATURE: support for slack custom username
* make slack username setting backwards compatible
* fix slack username behavior when empty string
2019-09-11 10:08:40 -04:00
David Taylor
f75903cae5
FIX: Determine uncategorized category name using new core pattern
2019-06-04 18:47:32 +01:00
Guo Xiang Tan
ac288b9300
Add frozen string literal comment to files.
2019-05-13 10:37:49 +08:00
Guo Xiang Tan
2b357b2dfe
Add support for new upload site settings.
...
44391ee8ab
2018-11-14 15:17:44 +08:00
Guo Xiang Tan
b19550502e
Fix the build.
2017-10-10 12:56:48 +08:00
David Taylor
6a976c4d66
Remove thumb_url from Mattermost, and restore accidental deletion from Slack
2017-09-09 23:08:45 +01:00
David Taylor
438a9d92fe
Remove incorrect thumb_url from mattermost
2017-09-09 21:07:07 +01:00
David Taylor
148dd8df6b
Tidy up Slack provider implementation
2017-08-21 15:28:37 +01:00
David Taylor
3314721232
RSpec tests for slack transcript posting
2017-08-15 17:44:51 +03:00
David Taylor
4d811ed83e
Make transcript generation object-oriented
2017-08-03 15:48:33 +01:00
David Taylor
4f9ad4efef
Correct rubocop offenses
2017-08-01 20:53:39 +01:00
David Taylor
ce8acc9c26
Disallow duplicate channels - providers can define which fields should be ‘unique’
2017-07-28 15:47:46 +01:00
David Taylor
e733c2564f
Add mattermost slash command support
2017-07-26 13:09:05 +01:00
David Taylor
1ef9073027
Make CHANNEL_PARAMETERS a list
2017-07-17 17:53:32 +01:00
David Taylor
ebb6fa947d
Update slack provider to deal with new channel structure
2017-07-13 23:21:15 +01:00
David Taylor
4b25dcec8f
Allow providers to define a data schema for their channel parameters
2017-07-13 20:50:45 +01:00
David Taylor
f2c5223bc6
Remove accidental dependency on discourse-slack-official
2017-07-12 11:58:19 +01:00
David Taylor
95dd6bc09c
Add error handling to the slack API requests, and associated tests
2017-07-07 11:23:25 +01:00
David Taylor
2f6d6f0d54
Automatically mount provider’s engines at /chat-integration/{provider_name}
...
Provider controllers are automatically disabled when the provider is disabled (works the same way as plugin controllers)
2017-07-05 15:03:02 +01:00
David Taylor
aaaffdf371
Add ‘send test message’ functionality to the admin interface
2017-07-04 23:35:45 +01:00
David Taylor
d97d35fd0d
Handle errors on trigger_notification
...
Providers can define their own errors, and these are presented in the user interface. e.g. Slack can define an error that says “That channel doesn’t exist”.
Errors in the UI disappear once a message has been sent successfully, or the rule is edited.
2017-07-04 19:37:56 +01:00
David Taylor
4be010fd07
Allow providers to specify a regex that the channel identifier is checked against during validation
2017-07-04 00:14:01 +01:00
David Taylor
1c416d5a81
Allow providers to be disabled, and tidy up translations
2017-07-03 15:53:26 +01:00
David Taylor
4643ad255c
Rename plugin to discourse-chat-integration
2017-07-03 11:08:14 +01:00
David Taylor
b824773a8a
Add tests for SlackProvider
2017-06-30 16:39:19 +01:00
David Taylor
0074f90f14
Allow sending by API instead of webhooks for slack
2017-06-30 15:28:44 +01:00
David Taylor
3f0462d40c
Implement slack provider, based on existing plugin.
...
Currently only implements the “Webhook” method, not the “Web API” method
2017-06-30 13:09:36 +01:00
David Taylor
4ad9ad6a7a
Move lib files inside a discourse_chat directory, and make the notifications run on a delay after post creation
2017-06-30 11:10:11 +01:00