Commit Graph

1273 Commits

Author SHA1 Message Date
Régis Hanol 44aaf4415d DEV: ensure discobot has a user_option & user_profile
When doing a migration, there might be some cases where the discobot user
doesn't have a user_option / user_profile record(s).

This ensures we always create one during the seed phase.
2020-07-07 18:24:31 +02:00
Bianca Nenciu 10e2578751
FIX: Set default value for poll result field (#10178) 2020-07-07 17:23:21 +03:00
Sam Saffron 9075d5a9f5
Revert "FIX: Set default value for poll result field (#10044)"
This reverts commit 40de535224.

Sadly this appears to break the JS test suite
2020-07-07 10:24:37 +10:00
Bianca Nenciu 40de535224
FIX: Set default value for poll result field (#10044) 2020-07-07 10:16:21 +10:00
Joffrey JAFFEUX b2a2e4f1e5
FIX: ensures seconds are displayed when used with dates (#10170) 2020-07-06 09:26:31 +02:00
Régis Hanol d234e0f922 SPEC: add spec to ensure discobot works in French
PERF: memoize cooked triggers

Follow-up to 3c31884b
2020-06-26 12:48:11 +02: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
Neil Lalonde 713298c622
FIX: advanced tutorial errors when all categories are secured (#10111)
The category hashtag step will fail with an error when all
categories aren't public. Choose a category that the user can see.
2020-06-24 15:45:50 +10:00
Rafael dos Santos Silva 4c543b4a49
UX: Make youtube embeds full width by default (#10106)
* UX: Make youtube embeds full width by default

* UX: Make youtube embeds fluid by default actually

* Remove double sizes in yt-lazy
2020-06-23 17:21:36 -03:00
Guo Xiang Tan 3370ef188e
FEATURE: Remove deprecated uploads url site settings.
The site settings have been replaced with direct image upload since
Discourse 2.3.
2020-06-22 14:32:29 +08:00
Jarek Radosz 26260d50b1
DEV: Import `I18n` in standard plugins (#10098) 2020-06-22 02:36:45 +02:00
Gerhard Schlager 390dc5c7a9 Update translations 2020-06-21 11:58:21 +02:00
Gerhard Schlager 36a3675e0a Update translations 2020-06-14 23:39:33 +02:00
Bianca Nenciu ff6811ceb8
Allow multiple groups which can vote when creating a poll (#10015)
* FEATURE: Allow multiple groups which can vote when creating a poll

* DEV: Fix select-kit deprecations

* DEV: Fix lint
2020-06-12 14:52:32 +03:00
Neil Lalonde 65dd8e2fa2
Update translations 2020-06-10 12:01:02 -04:00
Arpit Jalan 3094459cd9
FEATURE: multiple use invite links (#9813) 2020-06-09 20:49:32 +05:30
Neil Lalonde 72c09ab4ae
Update translations 2020-06-01 13:58:51 -04:00
David Taylor 13d00eaad0
Drop support for outdated browsers (#9956)
In particular, this includes Internet Explorer 11. Code which existed to support old browsers will be removed over the coming weeks.

https://meta.discourse.org/t/discourse-is-ending-support-for-internet-explorer-11-ie11-on-june-1-2020/137984
2020-06-01 16:38:44 +01:00
Neil Lalonde 3d20a1143b
Update translations 2020-05-26 10:06:07 -04:00
Kane York 979093787f
FIX: Include lazyYT-container in cooked post HTML (#9870)
This applies the new styles without waiting for the JS to run.
2020-05-25 14:24:40 -07:00
Joffrey JAFFEUX faeb5793ba
UI: various tweaks to polls UI on mobile (#9864) 2020-05-23 19:08:49 +02:00
Michael Brown d9a02d1336
Revert "Revert "Merge branch 'master' of https://github.com/discourse/discourse""
This reverts commit 20780a1eee.

* SECURITY: re-adds accidentally reverted commit:
  03d26cd6: ensure embed_url contains valid http(s) uri
* when the merge commit e62a85cf was reverted, git chose the 2660c2e2 parent to land on
  instead of the 03d26cd6 parent (which contains security fixes)
2020-05-23 00:56:13 -04:00
Jeff Atwood 20780a1eee Revert "Merge branch 'master' of https://github.com/discourse/discourse"
This reverts commit e62a85cf6f, reversing
changes made to 2660c2e21d.
2020-05-22 20:25:56 -07:00
Ankur Dahiya 37128d71c7
Add rails_helper to spec (#9861) 2020-05-22 12:27:52 -04:00
Guo Xiang Tan 3aecc1990b
DEV: Review follow up to 234cd5c3e7. 2020-05-20 16:17:59 +08:00
Guo Xiang Tan 37983a7815
Fix lint. 2020-05-20 10:33:34 +08:00
Guo Xiang Tan b7387d4611
DEV: Remove code unused code when seeding narrative bot. 2020-05-20 10:22:51 +08:00
Guo Xiang Tan 234cd5c3e7
FIX: Switch discobot to pull avatar from gravatar. 2020-05-20 10:20:08 +08:00
Guo Xiang Tan 96c02caba7
DEV: Change use of Redis `flushall` to `flushdb`.
FLUSHALL removes all keys from all databases. Instead we only want to
remove keys from the current Redis database.
2020-05-19 10:20:00 +08:00
David Taylor f86b123cfc
DEV: Remove use of `const` in untranspiled js 2020-05-15 17:55:34 +01:00
David Taylor ac042c2bbe
UX: Fetch higher-resolution youtube thumbnails where available
We have been using YouTube's 'hqdefault.jpg' image which works consistently to provide a 480x360 thumbnail. YouTube does provide larger thumbnails, but not consistently for every video. By using og:image, we will fetch the best resolution YouTube can provide for each video.

This commit also refactors lazy-yt to re-use the thumbnail already existing in the cooked content. This means we get lazy-loading for free, and avoid hotlinking images to YouTube (when download remote images is enabled on the site).
2020-05-15 17:49:27 +01:00
David Taylor 0c6f30d92a
FIX: Allow lazy-yt thumbnails to fetched by pull_hotlinked_images
The thumbnails were being correctly downloaded, but the URLs were not being substituted correctly in post_process_cooked because the lazy-yt output did not include the `onebox` class.
2020-05-14 17:33:16 +01:00
Guo Xiang Tan a849bdf0c9
FIX: Don't publish typing presence if composer isn't opened.
Hitting cancel on composer will set composer's reply and title to null
causing our observer to fire.
2020-05-14 12:52:10 +08:00
Guo Xiang Tan 3d5589e026
DEV: Remove assertions that are not required. 2020-05-14 10:07:55 +08:00
Guo Xiang Tan c5ef465179
DEV: Avoid relative paths when importing in plugins. 2020-05-14 10:05:16 +08:00
Guo Xiang Tan 623920f13d
FEATURE: Introduce a staff only override key for discourse-presence.
Merge remote-tracking branch 'origin/coding-standards'
This uses the composer as a bridge for other plugins.
2020-05-13 14:13:31 +08:00
Guo Xiang Tan ca8d11635c
Add missing export in 15e32dc1af. 2020-05-13 13:57:12 +08:00
Guo Xiang Tan 15e32dc1af
FIX: Composer presence shows user as editing when replying. 2020-05-13 13:41:03 +08:00
Guo Xiang Tan aa40a07d73
FIX: Throttle typing function in discourse-presence. 2020-05-13 13:31:06 +08:00
Joffrey JAFFEUX e990d8adce
FIX: ensures preview is correctly computing timezone for current user (#9758)
This also fixes a related bug with timezones on displayed date when in calendar range.
2020-05-12 12:30:41 -07:00
Jarek Radosz 6e3fe1abba DEV: Use async/await instead of `andThen()` 2020-05-11 18:22:48 +02:00
Guo Xiang Tan 4a74f18e95
PERF: Move fetching of avatar into hijack for discobot certificate 2020-05-11 09:35:06 +08:00
Guo Xiang Tan 6359a5f8a9
DEV: Fix poll plugin causing error when server reloads in dev env. 2020-05-08 14:59:55 +08:00
Jarek Radosz 781e3f5e10
DEV: Use `response.parsed_body` in specs (#9615)
Most of it was autofixed with rubocop-discourse 2.1.1.
2020-05-07 17:04:12 +02:00
Joffrey JAFFEUX 1dd9df9cd0
REFACTOR: removes overwritten properties and duplicates fn (#9686) 2020-05-07 16:39:53 +02:00
Joffrey JAFFEUX 029d091ea8
FIX: displays poll's close date in local time (#9656) 2020-05-06 22:18:47 +02:00
Robin Ward f5bdbd347e Revert "FIX: Discobot has not been created with our custom avatar."
This reverts commit 1062dbc3e9.

Looks like it's causing some errors on migration.

```
/var/www/discourse/lib/image_sizer.rb:6:in `resize'
/var/www/discourse/lib/upload_creator.rb:120:in `block in create_for'
/var/www/discourse/lib/distributed_mutex.rb:33:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:29:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:29:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:14:in `synchronize'
/var/www/discourse/lib/upload_creator.rb:37:in `create_for'
```
2020-05-06 11:28:42 -04:00
Joffrey JAFFEUX 2f714c7412
FIX: end date of ranges in html preview was incorrect (#9654)
This commit also remove an unused block of code as previewedTimezones can't be empty anymore.
2020-05-06 17:16:36 +02:00
Guo Xiang Tan 1062dbc3e9 FIX: Discobot has not been created with our custom avatar.
Previously the image was imported from a Discourse hosted CDN but the
URL has since become invalid. However, it was not caught since all
errors are rescued. This commit fixes the issue by shipping the user
avatar with the plugin.
2020-05-06 09:25:01 +08:00
Guo Xiang Tan b299f5f491 DEV: Use Ember.Service over manually registering a factory.
Follow up to 9e827eb420
2020-05-06 09:24:49 +08:00