David Taylor
8de3e498b2
FIX: Only show admin dashboard errors when plugin/provider enabled ( #117 )
2022-03-25 15:53:49 +00:00
Jarek Radosz
46cdce24bd
DEV: Lose the es6 suffix ( #110 )
2022-03-04 19:27:42 +01:00
Blake Erickson
0eebd9f3ed
DEV: Adds post_to_slack scriptable for automation ( #108 )
...
This allows for the discourse automation plugin to have a "Send Slack
Message" script.
The script fields are a message, url, and slack channel. This will allow
for a custom slack message to be posted but can link back to an
arbitrary url (hopefully a discourse url) like a list of unanswered
topics instead of strictly only allowing a slack message that links back
to a Discourse Post object.
2022-02-25 12:17:20 -07:00
Mark VanLandingham
a8b7e9631b
DEV: Move admin namespace ( #87 )
2021-08-26 08:52:53 -05:00
Mark VanLandingham
a73f5da114
Rename DiscourseChat to DiscourseChatIntegration ( #82 )
2021-07-13 14:36:16 -05: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
Guo Xiang Tan
ac288b9300
Add frozen string literal comment to files.
2019-05-13 10:37:49 +08:00
David Taylor
790f1bb8b5
DEV: Remove unnecessary semicolon
2018-12-04 11:45:17 +00:00
Gerhard Schlager
c9ff8d8cb6
FIX: Relative links in translations should work with subfolder
2018-11-07 23:26:36 +01:00
Penar Musaraj
762300ab22
Avoid targetting "fa-" icon in test, prepare for FA5 in Discourse core
2018-11-01 18:03:39 -04:00
David Taylor
fc721a1768
FEATURE: Improve channel error visibility in the admin panel, stop adding chat integration errors to logs
2018-08-20 12:06:10 +01:00
Guo Xiang Tan
efddfe1d9b
Minor refactor.
2017-10-10 10:08:26 +08:00
David Taylor
4f9ad4efef
Correct rubocop offenses
2017-08-01 20:53:39 +01:00
David Taylor
964fb07c50
Move require_relative lines into the initializer
2017-07-20 15:37:45 +01:00
David Taylor
bdb81191d7
New admin interface for improved channel definitions
2017-07-18 16:17:03 +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
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
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
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
David Taylor
3e3a309c44
Initial commit
2017-06-26 15:08:06 +01:00