Commit Graph

50 Commits

Author SHA1 Message Date
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
David Taylor bdb81191d7 New admin interface for improved channel definitions 2017-07-18 16:17:03 +01:00
David Taylor 1ef9073027 Make CHANNEL_PARAMETERS a list 2017-07-17 17:53:32 +01:00
David Taylor ab2e4c2de8 Allow looking up channel by data attributes (nested json values) 2017-07-13 22:50:14 +01:00
David Taylor e850fb194b Update helper to deal with the new channel structure 2017-07-13 22:13:03 +01:00
David Taylor 246c81ce5c Update manager to deal with new channel structure 2017-07-13 21:47: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 e07a4da460 Model changes 2017-07-13 16:09:34 +01:00
David Taylor bfb499d4cf Refactor into /app directory, move everything out of plugin.rb 2017-07-13 13:32:11 +01:00