Commit Graph

42639 Commits

Author SHA1 Message Date
Bianca Nenciu
eb6d66fe6f
FIX: Do not allow negative values for LIMIT (#14122)
Negative values generated invalid SQL queries.
2021-08-24 10:45:26 +03:00
dependabot[bot]
f03f0866e7
Build(deps): Bump sidekiq from 6.2.1 to 6.2.2 (#14124)
Bumps [sidekiq](https://github.com/mperham/sidekiq) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/mperham/sidekiq/releases)
- [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md)
- [Commits](https://github.com/mperham/sidekiq/compare/v6.2.1...v6.2.2)

---
updated-dependencies:
- dependency-name: sidekiq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-24 10:20:45 +08:00
dependabot[bot]
e0caa78fb0
Build(deps): Bump mini_mime from 1.1.0 to 1.1.1 (#14125)
Bumps [mini_mime](https://github.com/discourse/mini_mime) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/discourse/mini_mime/releases)
- [Changelog](https://github.com/discourse/mini_mime/blob/master/CHANGELOG)
- [Commits](https://github.com/discourse/mini_mime/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: mini_mime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-24 10:20:30 +08:00
dependabot[bot]
697a699e83
Build(deps-dev): Bump faker from 2.18.0 to 2.19.0 (#14126)
Bumps [faker](https://github.com/faker-ruby/faker) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/faker-ruby/faker/releases)
- [Changelog](https://github.com/faker-ruby/faker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faker-ruby/faker/compare/v2.18.0...v2.19.0)

---
updated-dependencies:
- dependency-name: faker
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-24 10:20:15 +08:00
Martin Brennan
2ac9fd9dff
FIX: Use original from address when forwarding to group inbox (#14114)
When emails were forwarded to a group inbox by the email address
of the group, for example when an email ends up in spam and must
be manually forwarded to the group+site@discoursemail.com address,
the OP of the topic ended up being the group's email address instead
of the sender who originally sent the email to the group inbox.

This commit detects that an email has been forwarded using existing
tools, and if the from address matches one of the group incoming
email addresses, then we look at the forwarded email's from address
and use that instead for the incoming email from address as well as
the staged/regular user used for the Topic.user.

This will make it much cleaner to forward emails into a group inbox,
and will prevent issues with PostAlerter where the OP is double-notified
for these emails.
2021-08-24 08:57:28 +10:00
Kris
bde6f7e9b0
UX: Update "get a room" composer message (#14104) 2021-08-23 18:34:23 -04:00
Penar Musaraj
8fa4849abc
FIX: minor SK3 styling issues in Safari (#14121) 2021-08-23 15:42:11 -04:00
Osama Sayegh
19632ecfbb
FIX: Discard old search results if search term changes when moving posts to a different topic (#14117)
This also fixes an incorrect usage of `debounce`.

Meta topic: https://meta.discourse.org/t/odd-search-behaviour-when-moving-messages-as-a-staff-member/201261?u=osama.
2021-08-23 21:03:52 +03:00
Joffrey JAFFEUX
a230362f65
FIX: sk3 wizard regressions (#14120) 2021-08-23 19:57:42 +02:00
Penar Musaraj
3d6cbb5ab3
DEV: Watch for changes in wizard.scss (#14119)
This ensures the stylesheet is recompiled. Devs still need to refresh
the page manually, since we don't include the message bus in the wizard
app.
2021-08-23 13:39:53 -04:00
Joffrey JAFFEUX
691d1bde54
FIX: do not focus after search if dropdown is collapsed (#14118) 2021-08-23 19:33:50 +02:00
Joffrey JAFFEUX
6c0efd50bc
linting (#14115) 2021-08-23 14:21:58 +02:00
Joffrey JAFFEUX
d7c185bf3d
DEV: updates chart.js to 3.5.1 (#14107) 2021-08-23 13:49:49 +02:00
Joffrey JAFFEUX
cb59681d86
DEV: select-kit third major update with focus on accessibility (#13303)
Major changes included:
- better support for screen readers
- trapping focus in modals
- better tabbing order in composer
- alerts on no content found/number of items found
- better autofocus in modals
- mini-tag-chooser is now a multi-select component
- each multi-select-component will now display selection on one row
2021-08-23 10:44:19 +02:00
Sam
f1701764a6
Revert "FIX: Close emoji autocomplete when the opening colon : is removed (#14102)" (#14112)
This reverts commit c74f116a48.

Unfortunately it appears to be making mention autocomplete fail
2021-08-23 15:25:33 +10:00
Krzysztof Kotlarek
d41aa5e9f5
FEATURE: allow adding small action codes dedicated to groups (#14109)
Plugin API is allowing to add small action codes dedicated to groups.
This will be used by assign-plugin when topic is assigned or unassigned from group.
2021-08-23 15:06:58 +10:00
Osama Sayegh
c74f116a48
FIX: Close emoji autocomplete when the opening colon : is removed (#14102) 2021-08-23 14:19:38 +10:00
Martin Brennan
4dc93a53e4
FIX: Reset preProcessorStatus state correctly for composer-upload-uppy (#14111)
When resetting the preprocessor status states, we weren't using
the same default state as when the preprocessor status state is
first initialized with an associated plugin. This commit brings
the two into alignment, fixing a bug where if you cancelled an
upload then tried a new one the "Processing Upload" message would
never change to "Uploading... X", so any subsequent uploads were
uncancellable.

Since the state was not being reset correctly, the properties that
were supposed to be numbers ended up as `undefined`, so when calling
prop-- or prop++, they turned into NaN.
2021-08-23 13:50:37 +10:00
dependabot[bot]
3ac3a4b55e
Build(deps): Bump image_size from 2.1.1 to 2.1.2 (#14108)
Bumps [image_size](https://github.com/toy/image_size) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/toy/image_size/releases)
- [Changelog](https://github.com/toy/image_size/blob/master/CHANGELOG.markdown)
- [Commits](https://github.com/toy/image_size/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: image_size
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-23 11:36:15 +08:00
Martin Brennan
8989c9e6c9
FIX: Use file.id instead of file.name for media-optimization resolvers (#14110)
This change only applies when uppy is calling the media-optimization-worker.

Since the old way of calling the worker via jQuery file uploader will
be removed soon, there is no point coming up with some random string
to use in place of the file name for the promise resolvers there, we
can live with this for now.
2021-08-23 12:10:33 +10:00
Joe
2ab4f2a126
DEV: adds plugin-outlet before category in /latest on mobile (#14105)
Adding this so themes can avoid template overrides.
2021-08-22 04:06:07 +08:00
Joffrey JAFFEUX
efbc2481d8
DEV: removes plugin generator (#14101)
I don't have the time to maintain this and https://github.com/discourse/discourse-plugin-skeleton is doing 80% of the job very easily.
2021-08-20 11:29:06 +02:00
Alan Guo Xiang Tan
f3f7efd439
DEV: Remove invalid class. (#14100)
There is no CSS class for `noGlyph`.
2021-08-20 16:05:04 +08:00
Martin Brennan
ecb83d0279
FIX: Adding debugging and fixing media-optimization-worker issues (#14099)
When we encountered an error with the media-optimization-worker,
we stopped the worker, which made it so further messages were not
received when optimizing images in parallel. Removed this based
on an option.

Also added more debugging lines to help track down issues.
2021-08-20 14:35:39 +10:00
Alan Guo Xiang Tan
16cfbed89d
DEV: Upgrade Rails to 6.1.4.1. (#14098)
This pulls in a fix for CVE-2021-22942 but we're not tagging it as a
security fix because Discourse is not affected by it in production.
2021-08-20 10:20:08 +08:00
dependabot[bot]
70552a2d43
Build(deps): Bump rubocop from 1.19.0 to 1.19.1 (#14095)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.19.0...v1.19.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-20 08:25:17 +08:00
dependabot[bot]
9f71dee98e
Build(deps-dev): Bump listen from 3.6.0 to 3.7.0 (#14096)
Bumps [listen](https://github.com/guard/listen) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/guard/listen/releases)
- [Commits](https://github.com/guard/listen/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: listen
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-20 08:25:04 +08:00
Andrei Prigorshnev
d1781e4c7d
FEATURE: improve "blank page syndrome" on the user bookmarks page 2021-08-20 00:08:59 +04:00
Joffrey JAFFEUX
2bbc97fda5
DEV: UserOption.user_tzinfo (#14088)
Provides a safe way to retrieve the timezone of a user.

This is not used in core yet, but used in multiple plugins.
2021-08-19 21:56:14 +02:00
Joe
e1815a125d
DEV: adds plugin-outlet before category in /latest (#14092)
Adding this so themes can avoid template overrides.
2021-08-20 03:02:40 +08:00
Bianca Nenciu
a56122f2d3
FIX: Always reload post's raw when editing a post (#14085)
Sometimes the message bus update can be delayed and editing a post when
that happens will automatically result in a draft conflict.
2021-08-19 15:29:48 +03:00
David Taylor
5eb4e642a6
DEV: Rename discourse-presence endpoints and messagebus channels (#14089)
We are working to introduce a general core API for presence, which will clash with this plugin's `/presence` namespace

This commit introduces no functional change. There may be a slight interruption in discourse-presence functionality during a deploy of this commit.
2021-08-19 13:04:31 +01:00
Osama Sayegh
ec352a1969
FEATURE: Order pinned topics by their pinned_at column (#14090)
Currently, pinned topics are ordered by the `bumped_at` column. This behavior is not desired because it gives admins no control over the order of pinned topics. This PR makes pinned topics ordered by the `pinned_at` column. A topic that is pinned last appears first in topic lists. If an admin wants an already pinned topic to appear first in the list of pinned topics, they'll have to unpin that topic and pin it again.

Meta topic: https://meta.discourse.org/t/how-do-i-set-the-order-of-pinned-topics/16935/23?u=osama.
2021-08-19 14:43:58 +03:00
Andrei Prigorshnev
46cdddbac9
FIX: pick-files-button component (#14045)
A file should be accepted if it has supported extension OR supported MIME type.
2021-08-19 14:56:03 +04:00
Dan Ungureanu
c0ec1e931e
FIX: Make themes:update work with multisites (#14082)
Running this Rake task in a multisite cluster updated only the default
site.
2021-08-19 09:41:58 +03:00
Arpit Jalan
c481f2ce16
UX: do not show selected composer education messages on whisper post (#14078)
This commit disables the "sequential_replies" and "duplicate_link"
education message on composer when creating a whipser post.
2021-08-19 09:32:32 +05:30
Roman Rizzi
a50cb61dd5
FIX: Deprecated method should still behave the same. (#14067) 2021-08-19 09:58:26 +08:00
Grayden
64ead3c3a1
FIX: Revoking admin or moderator status doesn't require refresh to delete/anonymize/merge user (#14073)
* FIX: Revoking admin or moderator status doesn't require refresh to delete/anonymize/merge user

On the /admin/users/<id>/<username> page, there are action buttons that are either visible or hidden depending on a few fields from the AdminDetailsSerializer: `can_be_deleted`, `can_be_anonymized`, `can_be_merged`, `can_delete_all_posts`.

These fields are updated when granting/revoking admin or moderator status. However, those updates were not being reflected on the page. E.g. if a user is granted moderation privileges, the 'anonymize user' and 'merge' buttons still appear on the page, which is inconsistent with the backend state of the user. It requires refreshing the page to update the state.

This commit fixes that issue, by syncing the client model state with the server state when handling a successful response from the server. Now, when revoking privileges, the buttons automatically appear without refreshing the page. Similarly, when granting moderator privileges, the buttons automatically disappear without refreshing the page.

* Add detailed user response to spec for changed routes.

Add tests to verify that the revoke_moderation, grant_moderation, and revoke_admin routes return a response formatted according to the AdminDetailedUserSerializer.
2021-08-19 09:57:16 +08:00
dependabot[bot]
617ca563f6
Build(deps): Bump rails-html-sanitizer from 1.3.0 to 1.4.1 (#14086)
Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.3.0 to 1.4.1.
- [Release notes](https://github.com/rails/rails-html-sanitizer/releases)
- [Changelog](https://github.com/rails/rails-html-sanitizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.3.0...v1.4.1)

---
updated-dependencies:
- dependency-name: rails-html-sanitizer
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-19 09:21:18 +08:00
Arpit Jalan
cfc280676e
FIX: do not show default locale option on site text customization (#14083) 2021-08-19 05:54:21 +05:30
Martin Brennan
2bf2d799c3
FIX: Bookmark delete button alignment in modal-footer (#14087)
The commit cd38ec2a4d broke
the bookmark delete button alignment in the modal.
2021-08-19 10:15:50 +10:00
Penar Musaraj
052c78381b
FIX: Include tags in quick search suggestions (#14080)
Followup to 438a762956
2021-08-18 14:14:10 -04:00
Andrei Prigorshnev
ded6a4a0ea
FIX: add a string for the Unseen view tab tooltip (#14079) 2021-08-18 20:50:53 +04:00
Bianca Nenciu
5c9abab0cd
FIX: Remove markers from all translated languages (#14081)
Emails can include the marker in a different language, depending on
site and user settings. The email receiver always looked for the marker
in default language.
2021-08-18 19:42:04 +03:00
Arpit Jalan
7db3888f17
FIX: log proper error message when SSO nonce verification fails (#14077) 2021-08-18 18:44:12 +05:30
Bianca Nenciu
4380ba34d5
FIX: Make site tasks work with duplicated uploads (#13972)
Uploads can be reused between site settings. This change allows the same
upload to be exported only once and then the same file is reused. The
same applies to import.
2021-08-18 15:57:31 +03:00
Alan Guo Xiang Tan
d13716286c
FIX: Unread group PMs should use GroupUser#first_unread_pm_at. (#14075)
This bug was causing unread PMs for groups to appear inaccurate.
2021-08-18 11:23:28 +08:00
dependabot[bot]
3d92555f7a
Build(deps): Bump oj from 3.13.1 to 3.13.2 (#14070)
Bumps [oj](https://github.com/ohler55/oj) from 3.13.1 to 3.13.2.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.13.1...v3.13.2)

---
updated-dependencies:
- dependency-name: oj
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-18 10:44:33 +08:00
dependabot[bot]
271bab92f2
Build(deps): Bump fast_blank from 1.0.0 to 1.0.1 (#14071)
Bumps [fast_blank](https://github.com/SamSaffron/fast_blank) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/SamSaffron/fast_blank/releases)
- [Commits](https://github.com/SamSaffron/fast_blank/compare/1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: fast_blank
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-18 10:44:07 +08:00
Arpit Jalan
6646ee3046
FIX: if the category slug is not present then search via ID (#14060) 2021-08-18 05:48:06 +05:30