Commit Graph

18 Commits

Author SHA1 Message Date
David Taylor 055310cea4
DEV: Apply syntax_tree formatting to `plugins/*` 2023-01-07 11:11:37 +00:00
Martin Brennan b690e7787e
FIX: Missing iframe closing tag in discobot certificate (#13052)
When issuing the discobot certificate, we were not closing the
iframe tag, which meant that the final message instruction to
the user was swallowed up.
2021-05-13 15:51:12 +10:00
Rafael dos Santos Silva bf5611f7eb
FIX: Make discobot certificate faster/non blocking (#11344)
This moves the way we add the user avatar and site logo
to the discobot certificates from embeded base64 png to
just using the files urls in the href to the image tag.

This will make generation faster and the certificate
smaller overall, but it can't be used in a  `img` tag
anymore, since SVGs in `img` tags don't load the external images

In order to work around that we will move the certificate
in posts to an iframe, which works fine without any user
visible changes. For this to be possible the plugin automatically
adds the site current domain to the list of allowed iframe origins.
2021-02-01 20:49:32 -03:00
Daniel Waterworth 721ee36425
Replace `base_uri` with `base_path` (#10879)
DEV: Replace instances of Discourse.base_uri with Discourse.base_path

This is clearer because the base_uri is actually just a path prefix. This continues the work started in 555f467.
2020-10-09 12:51:24 +01:00
Guo Xiang Tan 75ad071899
FEATURE: Add hidden site settings for discobot to skip certain tutorials
Hidden for now because I'm undecided on whether this should be an
exposed interface.
2020-07-14 15:17:50 +08:00
Blake Erickson 80a80ef2bd DEV: Use method instead of constant for discobot badge names
This change refactors the code a bit so that a plugin could easily
replace which badge is awarded when completing the discobot new user
tutorial and advanced tutorial.

By adding a static method and putting the BADGE_NAME constant inside of
that method we can simply call that method now instead of the constant.
A plugin could then `class_eval` that method and replace it with
whatever badge name they choose. This is way cleaner than having the
plugin change the frozen constant! eeek.
2020-04-09 20:46:51 -06: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 61cc0f8c5f Follow up to 152238b4cf. 2019-05-07 09:57:27 +08:00
Guo Xiang Tan 152238b4cf DEV: Prefer `public_send` over `send`. 2019-05-07 09:33:21 +08:00
Michael Brown b01a4c0ada lint: fix whitespace 2018-03-27 12:11:17 -04:00
Régis Hanol 0187423c68
FIX: discobot certificate description wasn't escaped 2018-03-27 17:57:53 +02:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Guo Xiang Tan c049e18203 FEATURE: Allow tutorials to declare prerequisite before it starts. 2017-07-13 15:12:45 +09: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
Neil Lalonde 23dfddbfb4 FIX: narrative bot on subfolder installs 2017-06-01 15:15:34 -04:00
Guo Xiang Tan 7f0561b621 Merge discourse-narrative-bot into core plugins. 2017-05-24 15:28:34 +08:00