Commit Graph

19 Commits

Author SHA1 Message Date
Loïc Guitaut f7c57fbc19 DEV: Enable `unless` cops
We discussed the use of `unless` internally and decided to enforce
available rules from rubocop to restrict its most problematic uses.
2023-02-21 10:30:48 +01:00
David Taylor 055310cea4
DEV: Apply syntax_tree formatting to `plugins/*` 2023-01-07 11:11:37 +00:00
Guo Xiang Tan 753477e684
FIX: Slightly reduce fake delay of discobot user.
Previously it would sleep for either 2 or 3 seconds instead of sleeping
between a range of 2 to 3 seconds. Also, 2 to 3 seconds seems to be
excessivly long when I tried out discobot again.
2020-07-13 09:08:31 +08:00
Régis Hanol 3c31884b79 FIX: match discobot triggers on cooked version
In French, the help trigger has a raw content of "afficher l'aider" which is then cooked into "afficher l’aide" (note the different quote character).
Since we were checking the raw content of the trigger against the cooked version of the post, this trigger never worked in French.

This changes so that we cook the trigger before checking in against the cooked version of the post.

DEV: new 'discobot_username' method that is used everywhere instead of 'discobot_user.username' / 'discobot_user.username_lower'
2020-06-25 13:29:55 +02:00
Krzysztof Kotlarek 9bff0882c3
FEATURE: Nokogumbo (#9577)
* FEATURE: Nokogumbo

Use Nokogumbo HTML parser.
2020-05-05 13:46:57 +10:00
Joffrey JAFFEUX 0d3d2c43a0
DEV: s/\$redis/Discourse\.redis (#8431)
This commit also adds a rubocop rule to prevent global variables.
2019-12-03 10:05:53 +01:00
David Taylor 22e713d2b0 FIX: Add skip_validations in one more place for narrative bot plugin
Followup to bbb814e58e
2019-11-20 15:43:42 +00:00
David Taylor bbb814e58e FIX: Allow advanced tutorial when title emojis are disabled
We already skip validations for other uses of PostCreator in the narrative bot, so this commit adds it in the `reply_to` action as well
2019-11-20 15:29:06 +00:00
Sam Saffron 30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Guo Xiang Tan c72f16d927 Follow up to 329969ea20. 2019-05-08 15:36:12 +08:00
Guo Xiang Tan 329969ea20 FIX: Discobot mention tutorial should be case insensitive. 2019-05-07 10:54:22 +08:00
Guo Xiang Tan 9f873fa66c FIX: Invalid setex expire time in `DiscourseNarrativeBot::Actions#reset_rate_limits`. 2018-05-25 16:02:15 +08:00
Guo Xiang Tan e888369f51 UX: Don't send emails for discobot notifications. 2017-06-12 17:00:27 +09:00
Guo Xiang Tan 17c29c972b Move the constant as well. 2017-06-06 15:38:26 +09:00
Guo Xiang Tan 30f2758404 FIX: Ensure that we cancel any timeout jobs when terminating a track. 2017-06-05 16:23:25 +09:00
Guo Xiang Tan cd2869c767 Revert "Skip validations when Discobot creates new posts."
This reverts commit ca7e906774.

Post validations are already skipped for admin users. Skipping
validations cause polls to not work.
2017-06-03 07:18:23 +09:00
Guo Xiang Tan ca7e906774 Skip validations when Discobot creates new posts. 2017-05-31 17:51:05 +09:00
Guo Xiang Tan 7028bdceed FIX: Allow users to rename discobot without having to rebuild. 2017-05-26 10:09:42 +08:00
Guo Xiang Tan 7f0561b621 Merge discourse-narrative-bot into core plugins. 2017-05-24 15:28:34 +08:00