David Taylor
6ed0deedf8
Don’t load responses to threads ( #14 )
...
* Don’t load responses to threads
* Add test case for ignoring threaded messages
* Appease rubocop
2017-11-27 16:07:25 +08:00
Maja Komel
7889691cdb
fix rubocop offenses
2017-10-17 12:21:36 +02:00
Maja Komel
92d6a6ba0e
Add notification support for Flowdock
2017-10-16 16:44:21 +02:00
Guo Xiang Tan
2b74fe0767
Remove unnecessary extension.
2017-10-10 13:01:46 +08:00
Guo Xiang Tan
b19550502e
Fix the build.
2017-10-10 12:56:48 +08:00
Guo Xiang Tan
5d11f443c0
REFACTOR: No need for `return` at end of each method.
2017-10-10 12:02:27 +08:00
Guo Xiang Tan
efddfe1d9b
Minor refactor.
2017-10-10 10:08:26 +08:00
Guo Xiang Tan
f836047f90
REFACTOR: Clean up code in plugin.
2017-10-03 17:42:07 +08:00
David Taylor
47a6a89e5a
Defer processing of transcripts to avoid timeouts
2017-09-15 23:12:02 +01: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
Guo Xiang Tan
16c5607fa4
Use `before_action` instead of `before_filter` for Rails 5.1 compatibility.
2017-09-04 10:44:32 +08:00
David Taylor
1fa228b68c
Add site setting to allow adding “content” to Discord messages
...
This can include ‘mentions’ such as `@everyone`
2017-09-01 21:03:31 +01:00
David Taylor
9d99f5659a
Adjust gitter regex
2017-08-31 01:51:28 +01:00
jafethdc
e90d65f5d5
Add notifications support for Gitter
2017-08-30 18:11:06 -05:00
David Taylor
5ea6553236
Add support for Rocket.Chat
2017-08-23 16:43:27 +01:00
David Taylor
9b229b63f9
Use generic messages API for Zulip
...
It is now available to bots, so there is no need for the custom discourse endpoint any more :)
2017-08-23 12:36:11 +01:00
David Taylor
e3f09d8eb5
Add Zulip support
2017-08-21 23:34:04 +01:00
David Taylor
148dd8df6b
Tidy up Slack provider implementation
2017-08-21 15:28:37 +01:00
David Taylor
ccb8571da5
Fix hipchat colour regex
2017-08-16 15:51:46 +03:00
David Taylor
064079a4ed
Add auto-detection of first message in conversation
2017-08-15 18:19:24 +03:00
David Taylor
3314721232
RSpec tests for slack transcript posting
2017-08-15 17:44:51 +03:00
David Taylor
658553e875
Refactor transcript posting
2017-08-15 10:26:03 +03:00
David Taylor
9604edaf88
Allow selecting first transcript message using a URL
2017-08-04 13:06:57 +01:00
David Taylor
9dc5445b7b
Fix spec
2017-08-04 00:54:11 +01:00
David Taylor
12f3b96e02
Improve slack transcript posting UI with message buttons
2017-08-04 00:47:04 +01:00
David Taylor
cfaef26e5d
More modularisation for slack transcript generation
2017-08-03 17:24:49 +01: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
f1df1f5234
Fix discord avatar URL
2017-07-31 14:47:27 +01:00
David Taylor
142687f4d4
Don’t send avatar URL to Discord, because it doesn’t specify a protocol
2017-07-29 19:52:46 +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
2275793f6c
Allow fields to be hidden from channel list (still visible in edit modal).
2017-07-28 14:15:53 +01:00
David Taylor
a5d62bd44d
Fix telegram error translation keys
2017-07-28 13:25:31 +01:00
David Taylor
5a4faa637f
Add matrix support
2017-07-27 17:09:44 +01:00
David Taylor
5c93b7792c
Add ‘view on slack’ link to transcripts
2017-07-26 19:51:44 +01:00
David Taylor
95f99e5fcf
Improve slack transcript formatting
2017-07-26 19:27:22 +01:00
David Taylor
e733c2564f
Add mattermost slash command support
2017-07-26 13:09:05 +01:00
David Taylor
61a4fd2c23
Add Mattermost support
2017-07-25 22:14:48 +01:00
David Taylor
c51e8ec3b5
Add HipChat support
2017-07-24 19:22:19 +01:00
David Taylor
8ca4797797
Add transcript posting support to slack
2017-07-24 16:43:37 +01:00
David Taylor
0d9b251030
Allow telegram to send notifications to ‘broadcast channels’
2017-07-21 19:12:31 +01:00
David Taylor
701e246ad2
Support slash commands in telegram group chats
2017-07-21 17:55:33 +01:00
David Taylor
b5e2741214
Add discord support
2017-07-21 15:48:57 +01:00
David Taylor
9d91081f0c
Fix the post URL for telegram messages
2017-07-20 12:27:34 +01:00
David Taylor
970c38c7fe
Add telegram specs
2017-07-19 21:26:16 +01:00
David Taylor
236251ed11
Remove unnecessary log
2017-07-19 17:34:41 +01:00
David Taylor
509e7bc997
Add telegram slash commands
2017-07-19 17:28:36 +01:00
David Taylor
694bf919ce
Move slack command processor into common helper so it can be used by other providers
2017-07-19 16:57:33 +01:00
David Taylor
2e94f23fbe
Add Telegram provider.
...
Does not yet support slash commands, and is without tests.
2017-07-19 16:28:02 +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
bfb499d4cf
Refactor into /app directory, move everything out of plugin.rb
2017-07-13 13:32:11 +01:00
David Taylor
4207456716
Abstract away DiscourseChat::PluginModel to be used for other ActiveRecord models
2017-07-12 23:59:43 +01:00
David Taylor
56da3639ab
Use real ActiveRecord for the “Rule” model by extending the PluginStoreRow class.
...
This gives us all the activerecord awesomeness for free, like validations, safe form params etc.
2017-07-12 18:28: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
f001320574
Add integration tests for slack ‘slash commands’
...
Adapted from existing slack plugin
2017-07-06 23:30:27 +01:00
David Taylor
062aa8d875
Add create/delete rule functionality to the slack ‘slash commands’
2017-07-06 21:42:37 +01:00
David Taylor
527063aed0
Add helper function for deleting rules
2017-07-06 21:36:50 +01:00
David Taylor
aa6430e23e
Add helper method to intelligently create new rules (avoiding duplicates)
2017-07-06 01:11:26 +01:00
David Taylor
fd333d59b7
Add basic “slash command” functionality to the slack provider
...
Based on the existing slack plugin. Currently does not implement creating new rules or deleting rules.
2017-07-05 23:01:46 +01:00
David Taylor
e4ff1997c8
Add a helper class for common provider functionality
...
Initially implemented a ‘status_for_channel’ function, based on the existing slack plugin
2017-07-05 23:00:58 +01:00
David Taylor
95344c348f
Allow filtering of rules by channel
2017-07-05 22:38:53 +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
444e380ca1
Tidy up admin user interface
2017-07-03 22:11:17 +01:00
David Taylor
0547543a1d
Add server-side validation to rules
2017-07-03 17:38:13 +01:00
David Taylor
f40f602a4f
Add validation to slack settings (adapted from old slack plugin)
2017-07-03 16:28:26 +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
David Taylor
8d70b4ad46
Allow add, edit & delete in the admin UI
2017-06-29 20:19:40 +01:00
David Taylor
61caca3c5b
Use new DiscourseChat::Rule model throughout the backend code
2017-06-29 17:50:54 +01:00
David Taylor
cd3bd8d807
Add a “Rule” class, borrowing and extending the ActiveRecord-like design from data-explorer plugin
2017-06-29 17:01:04 +01:00
David Taylor
8e0bec6e6f
Use RestModel and buildPluginAdapter to deal with communication of data models between client and server
2017-06-28 22:32:02 +01:00
David Taylor
d8e5494d4c
Add (currently read-only) UI to the admin panel, displaying all existing rules. Dynamic routes created for each registered provider.
2017-06-28 15:12:37 +01:00
David Taylor
02692cf100
Added filtering logic for multiple providers, along with many RSpec tests.
...
General structure of the filter rules is taken from discourse-slack-official, but re-written to be more robust and easier to understand.
2017-06-27 19:43:29 +01:00
David Taylor
3967e2cd91
Created basic system to allow multiple integrations to register themselves, creating a separate tab in the admin interface for each one.
2017-06-26 19:19:50 +01:00