Commit Graph

58 Commits

Author SHA1 Message Date
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
Sam Saffron b4e6a15ccf DEV: lint file
Corrects rubocop which no longer allows explicit returns
2019-12-10 11:58:07 +11:00
Joffrey JAFFEUX 6540d8b957 DEV: uses Discourse.redis instead of $redis 2019-12-03 10:45:32 +01:00
Krzysztof Kotlarek 154361e22c FIX: Use top-level namespace for base classes (#33) 2019-09-16 13:38:30 -04:00
Krzysztof Kotlarek df44beb9a3 FIX: Save on chat_controller ready for Rails 6.0.0 (#31)
I think that passing attributes to save method is not necessary when the Object was initialized with them.

Problem is that with Rails 6.0.0 (https://github.com/discourse/discourse/pull/8083) this code is not working https://travis-ci.org/discourse/discourse/jobs/582556988
2019-09-10 10:02:24 +10:00
Guo Xiang Tan ac288b9300 Add frozen string literal comment to files. 2019-05-13 10:37:49 +08: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 c44ac56d32 Make rubocop happy. 2018-06-08 09:52:35 +08:00
Guo Xiang Tan 2c9cdb2ed3 Remove unnecessary logging. 2017-11-09 08:27:10 +08:00
Guo Xiang Tan 0cdb1d6538 FIX: Old channel may be invalid. 2017-10-20 20:21:02 +08:00
Guo Xiang Tan 0e52edd1fd FIX: Ensure that user exists before migrating. 2017-10-10 15:12:10 +08:00
Guo Xiang Tan 6bbac0a1e9 Maintain backwards compatibility with existing slash command. 2017-10-10 13:30:44 +08:00
Guo Xiang Tan 2e69d6a934 FIX: Properly migrate settings from `discourse-slack-official`. 2017-10-04 15:03:23 +08:00
Guo Xiang Tan f836047f90 REFACTOR: Clean up code in plugin. 2017-10-03 17:42:07 +08:00
Guo Xiang Tan 5cfa7f913d Don't migrate categories that do not exists anymore. 2017-10-03 16:33:07 +08:00
Guo Xiang Tan 1a3928b803 More improvements to migration script. 2017-10-03 15:41:27 +08:00
Guo Xiang Tan 2d6737ce5c REFACTOR: Remove hardcoded base `KEY_PREFIX`. 2017-10-03 15:35:44 +08:00
Guo Xiang Tan d77afa4c98 Remove self-explaintory comment. 2017-10-03 15:31:38 +08:00
Guo Xiang Tan 530e715588 STYLE: Shorten long lines. 2017-10-03 15:30:38 +08:00
Guo Xiang Tan f6e9fe9eb7 Remove dev dugging commands. 2017-10-03 15:16:09 +08:00
Guo Xiang Tan b33fb671f2 Filter out invalid tags when migrating. 2017-09-28 17:27:20 +08:00
Guo Xiang Tan 435b1cc9b5 Refactor plugin. 2017-09-28 16:32:38 +08:00
Guo Xiang Tan b0708c1aac Make sure we run the migrations in a transaction. 2017-09-28 16:19:12 +08:00
Guo Xiang Tan 49f58ec190 Fix tests to work with Rails 5.1. (#8) 2017-09-25 11:06:27 +08:00
David Taylor 92e22d65da Fix onceoff job to only run when slack is installed 2017-09-07 22:45:54 +01:00
David Taylor 1e52671c03 Add once-off job to migrate from discourse-slack-official 2017-09-04 13:58:09 +01:00
David Taylor 2251afbac0 Smart_create_rule should only use ‘normal’ rules 2017-09-04 13:14:15 +01:00
David Taylor 4703250c1f Only check channel uniqueness within the same provider 2017-08-23 16:31:47 +01:00
David Taylor c634b3ee65 Only check for mentions on standard posts (not PMs) 2017-08-01 22:15:27 +01:00
David Taylor 6af31bb244 Fix precedence for group-based rules 2017-08-01 21:09:01 +01:00
David Taylor 4f9ad4efef Correct rubocop offenses 2017-08-01 20:53:39 +01:00
David Taylor 01d7fb47ef Display group rules correctly in slash commands 2017-08-01 19:16:47 +01:00
David Taylor 6aa94fcb27 Add once off job to “migrate” the Rule model
We can’t use an actual activerecord migration because everything is JSON serialised :(
2017-08-01 17:12:21 +01:00
David Taylor f3347b0a92 Add support for group mentions 2017-08-01 17:11:34 +01:00
David Taylor 209daf7801 Add group messages support to admin UI, and add a ‘type’ field for further improvements 2017-08-01 15:20:00 +01:00
David Taylor d437634f61 Move rule editing into a modal dialog 2017-07-31 17:09:21 +01:00
David Taylor 4b2e8af711 Backend support for group pms 2017-07-31 14:51:03 +01:00
David Taylor 28091a9a97 Ignore self when checking for duplicate rule 2017-07-29 19:27:21 +01:00
David Taylor 61fa0dbe0b Replace `match?` with `match` for backwards compatibility with Ruby 2.3 2017-07-29 19:21:11 +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 2d7f25d7e6 Add support for chat transcripts
(still needs to be implemented by providers)
2017-07-24 16:13:53 +01:00
David Taylor 964fb07c50 Move require_relative lines into the initializer 2017-07-20 15:37:45 +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 c5fdebd1bc Store errors per-channel rather than per-rule, and update UI to match 2017-07-18 23:08:06 +01:00
David Taylor d1d333523f Order rules by precedence in the UI and slash commands 2017-07-18 21:36:07 +01:00
David Taylor 0a9ef040a1 Update specs for updated controller methods 2017-07-18 18:23:20 +01:00
David Taylor 2275b048f9 Destroy associated rules when a channel is destroyed 2017-07-18 16:42:05 +01:00