about summary refs log tree commit diff
path: root/app
AgeCommit message (Collapse)Author
2022-12-15Increase the width of the unread notification border. (#21692)Connor Shea
The smaller border is difficult to see for some users, especially when the browser window was thinner, and so the unread border is at the very left edge of the window.
2022-12-15Render current day formats in the client timezone (#21878)Francis Murillo
* Fix remaining plain %time to %time.formatted * Add %time.relative-formatted to client format dates on the current day * Add missing comma dangle to formats * Use client side message format instead of the server * Add fallback message to relatve_format.today * Remove unused translation key and fix js lint issue Co-authored-by: Effy Elden <effy@effy.space>
2022-12-15`FormattedMessage` must be used directly (#20982)Yamagishi Kazutoshi
* `FormattedMessage` must be used directly * rollback
2022-12-15Adding 12 hours option for polls (#21131)Pleclown
* Adding 12 hours option for polls Adding 12 hours option for polls * Adding 12 hours option for polls Missing > on a line
2022-12-15Fix hidden label causing accessibility issue for search inputs (#21275)Alex Stine
* Try unhiding search label. * Use aria-label. Remove label as empty labels are useless. * Remove addition of package-lock.json.
2022-12-15Fix being unable to react with the keycap number sign emoji (#22231)Jeremy Kescher
#⃣ This bug is caused by the emoji consisting of: U+23 # U+FE0F U+20E3 ⃣ Because it starts with a #, it's interpreted as an anchor link, which is not passed to the API. Therefore, the API sees no emoji to react with and answers correctly with a 404.
2022-12-15Fix N+1 queries from in NotificationsController (#21202)nametoolong
Co-authored-by: Nonexistent <nx@example.org>
2022-12-15Fix typos in source documentation (#21046)luzpaz
Fixed 2 source comment/documentation typos
2022-12-15Fix profile avatar being slightly offset into left border (fixes #20822) ↵Riedler
(#20994) * hotfix for #20822 I don't know why it was shifted in the first place or why the width is specified twice, but this fixes the problem, so it looks fine to me. * realigned pfp with content below * fixed formatting my bad * added comment to explain the negative margin before I forget - comments are *important* ! Co-authored-by: Riedler <riedler@gelse.eu>
2022-12-15Fix crash in elasticsearch_check.rb (#21006)s0
Nil unwrap causes the admin dashboard to crash/500 when the Chewy client info version number value is nil. This occurs when running another ES-compatible backend such as MeiliSearch. Obviously it would be good for chewy to recognise upstream but at least avoiding the crash would be fine.
2022-12-15Allow adding relays while secure mode & limited federation mode are enabled ↵Effy Elden
(#22324)
2022-12-15Fix invalid CSS for links in warning and strike cards (#22302)Claire
2022-12-15Don't delivery a reply to domains which are blocked by author (#22117)Jeong Arm
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-12-15Fix missing Javascript in domain block import confirmation page (#21471)Claire
Follow-up to #20597
2022-12-15Revoke all authorized applications on password reset (#21325)Francis Murillo
* Clear sessions on password change * Rename User::clear_sessions to revoke_access for a clearer meaning * Add reset paassword controller test * Use User.find instead of User.find_for_authentication for reset password test * Use redirect and render for better test meaning in reset password Co-authored-by: Effy Elden <effy@effy.space>
2022-12-15Change dropdown menu to contain “Copy link to post” even for non-public ↵Claire
posts (#21316) Fixes #21244
2022-12-15Allow admins to refresh remotely-suspended accounts (#22327)Claire
* Change suspension text to mention that a remotely suspended account is not locally-suspended * Add ability to refresh profile of remotely suspended accounts
2022-12-15Fix wasteful request to /api/v1/custom_emojis when not logged in (#22326)Claire
2022-12-13Add single splat to callback method definitions to avoid ArgumentError (#22246)zunda
It looks like a [bug](https://bugs.ruby-lang.org/issues/18633) around autosplat is [fixed](https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/fbaadd1cfe7fbfd1b904f193f99d7c845a6ed804) on ruby-3.2.0-rc1 and breaks a test (but not on ruby <= 3.1.3): ``` $ bundle exec rspec ./spec/controllers/api/v1/emails/confirmations_controller_spec.rb:41 : 1) Api::V1::Emails::ConfirmationsController#create with an oauth token from an app that created the account when the account is already confirmed but user changed e-mail and has not confirmed it returns http success Failure/Error: def email_changed(user, **) @resource = user @instance = Rails.configuration.x.local_domain return unless @resource.active_for_authentication? I18n.with_locale(locale) do mail to: @resource.email, subject: I18n.t('devise.mailer.email_changed.subject') end end ArgumentError: wrong number of arguments (given 2, expected 1) # ./app/mailers/user_mailer.rb:51:in `email_changed' # ./app/models/user.rb:444:in `render_and_send_devise_message' # ./app/models/user.rb:430:in `block in send_pending_devise_notifications' # ./app/models/user.rb:429:in `each' # ./app/models/user.rb:429:in `send_pending_devise_notifications' # ./spec/controllers/api/v1/emails/confirmations_controller_spec.rb:38:in `block (7 levels) in <top (required)>' ```
2022-12-13fix missing style in warning and strike cards (#22177)Rin
2022-12-13Make handle more easily selectable on profile page (#21479)cadars
* Make handle more easily selectable on profile page * Wrap handle in a span * Add `user-select: all` to span * remove whitespace
2022-12-13Change default reply language to be default language when replying to a ↵Claire
translated reply (#22272) Fixes #22250
2022-12-11Add noindex setting to Admin settings Discovery page (#22205)prplecake
* Add noindex setting to Admin settings Discovery page * Replace default_noindex i18n
2022-12-10New Crowdin updates (#21954)Eugen Rochko
* New translations en.json (Serbian (Cyrillic)) * New translations en.json (Serbian (Latin)) * New translations en.yml (Serbian (Latin)) * New translations simple_form.en.yml (Serbian (Latin)) * New translations activerecord.en.yml (Serbian (Latin)) * New translations doorkeeper.en.yml (Serbian (Latin)) * New translations devise.en.yml (Serbian (Latin)) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Chinese Traditional) * New translations en.json (Serbian (Latin)) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Icelandic) * New translations en.json (Serbian (Latin)) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Serbian (Latin)) * New translations en.json (Malay) * New translations en.json (Malay) * New translations activerecord.en.yml (Malay) * New translations devise.en.yml (Malay) * New translations en.yml (Malay) * New translations en.yml (Arabic) * New translations en.yml (Greek) * New translations en.yml (Galician) * New translations simple_form.en.yml (Malay) * New translations en.yml (Greek) * New translations en.yml (Russian) * New translations en.yml (Belarusian) * New translations en.yml (Greek) * New translations en.yml (Belarusian) * New translations simple_form.en.yml (Greek) * New translations en.json (Greek) * New translations en.yml (Greek) * New translations en.yml (Belarusian) * New translations doorkeeper.en.yml (Greek) * New translations en.yml (Greek) * New translations en.yml (Malay) * New translations simple_form.en.yml (Malay) * New translations en.json (Esperanto) * New translations en.yml (Malay) * New translations en.yml (Esperanto) * New translations devise.en.yml (Esperanto) * New translations en.yml (Vietnamese) * New translations simple_form.en.yml (Vietnamese) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Serbian (Latin)) * New translations en.yml (Belarusian) * New translations en.yml (Vietnamese) * New translations en.yml (Belarusian) * New translations en.yml (Kurmanji (Kurdish)) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Serbian (Latin)) * New translations en.json (Occitan) * New translations en.json (Czech) * New translations en.yml (Hebrew) * New translations doorkeeper.en.yml (Spanish, Argentina) * New translations en.json (German) * New translations en.yml (Spanish, Argentina) * New translations en.json (German) * New translations simple_form.en.yml (Serbian (Cyrillic)) * New translations en.json (German) * New translations en.json (Esperanto) * New translations en.yml (Esperanto) * New translations en.yml (Esperanto) * New translations en.yml (Thai) * New translations activerecord.en.yml (Scots) * New translations en.json (Scottish Gaelic) * New translations en.yml (Belarusian) * New translations en.yml (Belarusian) * New translations en.json (Latvian) * New translations en.json (Latvian) * New translations activerecord.en.yml (Latvian) * New translations devise.en.yml (Latvian) * New translations en.yml (Turkish) * New translations en.yml (Scottish Gaelic) * New translations en.yml (Danish) * New translations en.yml (Thai) * New translations en.yml (Belarusian) * New translations simple_form.en.yml (Thai) * New translations en.yml (Thai) * New translations en.json (Thai) * New translations en.yml (German) * New translations en.yml (German) * New translations simple_form.en.yml (German) * New translations en.json (Kurmanji (Kurdish)) * New translations en.json (Kurmanji (Kurdish)) * New translations en.yml (Belarusian) * New translations en.yml (Kurmanji (Kurdish)) * New translations en.json (Latvian) * New translations simple_form.en.yml (Serbian (Cyrillic)) * New translations en.yml (Belarusian) * New translations en.yml (German) * New translations en.json (German) * New translations simple_form.en.yml (German) * New translations simple_form.en.yml (Serbian (Cyrillic)) * New translations simple_form.en.yml (Spanish, Argentina) * New translations en.yml (German) * New translations en.json (German) * New translations en.yml (Spanish, Argentina) * New translations en.yml (Persian) * New translations en.json (Spanish, Mexico) * New translations en.yml (Belarusian) * New translations en.yml (German) * New translations en.json (Danish) * New translations en.yml (Danish) * New translations simple_form.en.yml (Scots) * New translations en.yml (Belarusian) * New translations en.yml (Danish) * New translations en.yml (Scots) * New translations simple_form.en.yml (Scots) * New translations en.json (Scots) * New translations devise.en.yml (Scots) * New translations doorkeeper.en.yml (Scots) * New translations en.yml (Greek) * New translations en.yml (Greek) * New translations en.yml (Belarusian) * New translations en.json (German) * New translations en.yml (Belarusian) * New translations en.yml (Spanish, Argentina) * New translations en.json (Spanish, Argentina) * New translations en.json (German) * New translations en.json (Esperanto) * New translations en.json (French) * New translations en.yml (Esperanto) * New translations en.yml (Belarusian) * New translations en.json (Esperanto) * New translations en.yml (Esperanto) * New translations en.yml (Belarusian) * New translations devise.en.yml (Esperanto) * New translations en.json (Slovak) * New translations en.yml (Slovak) * New translations activerecord.en.yml (Slovak) * New translations devise.en.yml (Slovak) * New translations doorkeeper.en.yml (Slovak) * New translations en.yml (Belarusian) * New translations en.yml (Slovak) * New translations en.yml (Belarusian) * New translations en.yml (Belarusian) * New translations en.json (Lithuanian) * New translations en.yml (Belarusian) * New translations simple_form.en.yml (Serbian (Cyrillic)) * New translations en.yml (Belarusian) * New translations simple_form.en.yml (Serbian (Cyrillic)) * New translations en.json (Esperanto) * New translations en.json (Vietnamese) * New translations en.yml (Belarusian) * New translations en.yml (Belarusian) * New translations en.yml (Belarusian) * New translations simple_form.en.yml (Belarusian) * New translations en.yml (Belarusian) * New translations en.yml (Latvian) * New translations en.yml (Belarusian) * New translations en.json (Welsh) * New translations en.yml (Welsh) * New translations simple_form.en.yml (Welsh) * New translations activerecord.en.yml (Welsh) * New translations devise.en.yml (Welsh) * New translations doorkeeper.en.yml (Welsh) * New translations en.json (Welsh) * New translations en.json (Welsh) * New translations en.yml (Welsh) * New translations en.yml (Hebrew) * New translations en.yml (Welsh) * New translations en.yml (Hebrew) * New translations en.yml (Russian) * New translations simple_form.en.yml (Serbian (Cyrillic)) * New translations simple_form.en.yml (Belarusian) * New translations en.yml (Ukrainian) * New translations en.json (Ukrainian) * New translations en.json (Chinese Simplified) * New translations en.json (Slovak) * New translations en.json (Slovak) * New translations en.yml (Slovak) * New translations en.yml (Belarusian) * normalize * New translations en.yml (Belarusian) * normalize Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-12-07Fix failure when “Require a reason to join” is set with open ↵Claire
registrations (#22127)
2022-12-07Fix potential duplicate statuses in Explore tab (#22121)Claire
2022-12-07Fix 500 error when trying to migrate to an invalid address (#21462)Claire
* Fix 500 error when trying to migrate to an invalid address * Add tests
2022-12-07Fix hidden overflow on interaction modal (#21763)Juan Xavier Gomez
* Fix hidden overflow on interaction modal * only update overflow y
2022-12-07Fix UI header overflow on mobile (#21783)Claire
2022-12-07Fix “Sign up” button with closed registrations not opening modal on ↵Claire
mobile (#22060) Fixes #20840
2022-12-07Log admin approve and reject account (#22088)Francis Murillo
* Log admin approve and reject account * Add unit tests for approve and reject logging
2022-12-07Fix unbounded recursion in account discovery (#22025)Claire
* Fix trying to fetch posts from other users when fetching featured posts * Rate-limit discovery of new subdomains * Put a limit on recursively discovering new accounts
2022-12-07Fix irreversible and whole_word parameters handling in /api/v1/filters (#21988)Claire
Fixes #21965
2022-12-06Fix the top border of verified account fields (#22006)Jed Fox
2022-12-04Fix spacing warning from ESLint (#22005)Nick Schonning
2022-12-02New Crowdin updates (#21599)Eugen Rochko
* New translations doorkeeper.en.yml (Esperanto) * New translations activerecord.en.yml (Spanish) * New translations activerecord.en.yml (Esperanto) * New translations doorkeeper.en.yml (Spanish) * New translations devise.en.yml (Spanish) * New translations devise.en.yml (Esperanto) * New translations en.json (Spanish) * New translations en.yml (Danish) * New translations en.json (Serbian (Cyrillic)) * New translations en.yml (Faroese) * New translations en.yml (Faroese) * New translations en.json (German) * New translations en.yml (Faroese) * New translations simple_form.en.yml (Faroese) * New translations en.yml (Belarusian) * New translations en.yml (German) * New translations en.json (German) * New translations simple_form.en.yml (Faroese) * New translations en.yml (Belarusian) * New translations doorkeeper.en.yml (Belarusian) * New translations en.yml (German) * New translations en.json (Bulgarian) * New translations en.json (German) * New translations en.yml (Bulgarian) * New translations simple_form.en.yml (Bulgarian) * New translations doorkeeper.en.yml (Bulgarian) * New translations en.json (Belarusian) * New translations simple_form.en.yml (Belarusian) * New translations en.json (Czech) * New translations en.json (Serbian (Cyrillic)) * New translations en.yml (Serbian (Cyrillic)) * New translations simple_form.en.yml (Faroese) * New translations devise.en.yml (Catalan) * New translations en.yml (German) * New translations en.json (Bulgarian) * New translations en.json (German) * New translations en.json (Catalan) * New translations en.yml (Catalan) * New translations en.json (Danish) * New translations en.json (Ukrainian) * New translations en.json (Galician) * New translations doorkeeper.en.yml (Catalan) * New translations simple_form.en.yml (German) * New translations en.json (Danish) * New translations en.yml (English, United Kingdom) * New translations simple_form.en.yml (Faroese) * New translations en.json (Danish) * New translations en.yml (Japanese) * New translations en.yml (German) * New translations en.json (Urdu (Pakistan)) * New translations simple_form.en.yml (German) * New translations simple_form.en.yml (Faroese) * New translations en.yml (German) * New translations en.json (Urdu (Pakistan)) * New translations simple_form.en.yml (Faroese) * New translations simple_form.en.yml (Faroese) * New translations en.json (Scots) * New translations activerecord.en.yml (Scots) * New translations en.json (Finnish) * New translations en.json (Finnish) * New translations en.json (Asturian) * New translations en.yml (Asturian) * New translations simple_form.en.yml (Asturian) * New translations activerecord.en.yml (Asturian) * New translations devise.en.yml (Asturian) * New translations doorkeeper.en.yml (Asturian) * New translations en.yml (Belarusian) * New translations en.json (Romanian) * New translations en.json (Galician) * New translations en.yml (Galician) * New translations doorkeeper.en.yml (Romanian) * New translations doorkeeper.en.yml (Galician) * New translations activerecord.en.yml (Romanian) * New translations en.yml (Russian) * New translations en.yml (Estonian) * New translations en.yml (Estonian) * New translations devise.en.yml (Estonian) * New translations en.json (Czech) * New translations en.yml (Bulgarian) * New translations en.json (Serbian (Cyrillic)) * New translations en.yml (Serbian (Cyrillic)) * New translations en.json (Galician) * New translations en.yml (Galician) * New translations en.json (Breton) * New translations simple_form.en.yml (Bulgarian) * New translations doorkeeper.en.yml (Bulgarian) * New translations simple_form.en.yml (Galician) * New translations devise.en.yml (Italian) * New translations en.json (Bulgarian) * New translations en.yml (Bulgarian) * New translations simple_form.en.yml (Bulgarian) * New translations doorkeeper.en.yml (Bulgarian) * New translations devise.en.yml (Italian) * New translations en.json (Serbian (Cyrillic)) * New translations doorkeeper.en.yml (Italian) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Chinese Traditional, Hong Kong) * New translations en.yml (Chinese Traditional, Hong Kong) * New translations en.json (Serbian (Latin)) * New translations simple_form.en.yml (Serbian (Cyrillic)) * New translations doorkeeper.en.yml (Italian) * New translations en.yml (Belarusian) * New translations en.yml (Belarusian) * New translations simple_form.en.yml (Serbian (Cyrillic)) * New translations en.yml (Belarusian) * New translations simple_form.en.yml (Serbian (Cyrillic)) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations simple_form.en.yml (Asturian) * New translations en.yml (Asturian) * New translations simple_form.en.yml (Asturian) * New translations en.json (Thai) * New translations en.yml (Thai) * New translations en.json (Thai) * New translations en.yml (Thai) * New translations en.yml (Czech) * New translations en.json (Czech) * New translations simple_form.en.yml (Czech) * New translations doorkeeper.en.yml (Czech) * New translations en.yml (Belarusian) * New translations en.yml (Thai) * New translations en.json (English, United Kingdom) * New translations en.yml (Belarusian) * New translations en.yml (Thai) * New translations en.yml (Estonian) * New translations en.yml (Thai) * New translations en.json (Thai) * New translations en.yml (German) * New translations en.json (Russian) * New translations en.yml (Icelandic) * New translations en.json (Estonian) * New translations en.yml (Estonian) * New translations en.yml (Belarusian) * New translations en.yml (Thai) * New translations en.json (Esperanto) * New translations en.yml (Esperanto) * New translations simple_form.en.yml (Esperanto) * New translations en.yml (Thai) * New translations en.json (Esperanto) * New translations en.yml (Thai) * New translations en.yml (Belarusian) * New translations en.yml (Thai) * New translations en.json (Icelandic) * New translations en.yml (Icelandic) * New translations simple_form.en.yml (Icelandic) * New translations doorkeeper.en.yml (Icelandic) * New translations en.yml (Belarusian) * New translations activerecord.en.yml (Icelandic) * New translations devise.en.yml (Icelandic) * New translations en.yml (Thai) * New translations en.json (Estonian) * New translations en.yml (Estonian) * New translations doorkeeper.en.yml (Estonian) * New translations en.yml (Belarusian) * New translations en.yml (Thai) * New translations en.yml (Belarusian) * New translations en.json (Bulgarian) * New translations en.yml (Bulgarian) * New translations en.json (Serbian (Cyrillic)) * New translations en.yml (Bulgarian) * New translations en.json (Serbian (Cyrillic)) * New translations en.yml (Estonian) * New translations en.json (Ukrainian) * New translations en.yml (Estonian) * New translations en.json (Esperanto) * New translations en.yml (Estonian) * New translations en.yml (Estonian) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations en.yml (Belarusian) * New translations en.yml (Belarusian) * New translations en.json (Persian) * New translations en.yml (Belarusian) * New translations en.json (Esperanto) * New translations en.json (Greek) * New translations en.json (Persian) * New translations en.json (Scots) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations en.yml (Thai) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations doorkeeper.en.yml (Estonian) * New translations en.yml (German) * New translations en.json (German) * New translations en.json (Finnish) * New translations en.yml (Estonian) * New translations en.yml (German) * New translations en.json (Estonian) * New translations en.yml (Estonian) * New translations simple_form.en.yml (German) * New translations simple_form.en.yml (Estonian) * New translations devise.en.yml (German) * New translations simple_form.en.yml (German) * New translations en.yml (Finnish) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Serbian (Cyrillic)) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations doorkeeper.en.yml (Estonian) * New translations en.json (Estonian) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations en.json (Spanish) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations en.yml (Thai) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations simple_form.en.yml (Icelandic) * New translations en.yml (German) * New translations en.yml (Ukrainian) * New translations en.json (Spanish, Mexico) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Spanish, Mexico) * New translations activerecord.en.yml (Spanish, Mexico) * New translations en.json (German) * New translations en.yml (Thai) * New translations en.json (Thai) * New translations en.json (Korean) * New translations en.json (Scottish Gaelic) * New translations en.yml (Scottish Gaelic) * New translations en.yml (Thai) * New translations en.yml (Japanese) * New translations en.json (Serbian (Cyrillic)) * New translations en.yml (Belarusian) * New translations en.json (Estonian) * New translations en.yml (Estonian) * New translations simple_form.en.yml (Estonian) * New translations en.json (Serbian (Cyrillic)) * New translations en.json (Estonian) * New translations en.json (Serbian (Cyrillic)) * New translations en.yml (Italian) * New translations en.yml (Italian) * New translations en.json (Kurmanji (Kurdish)) * New translations en.yml (Spanish) * New translations en.yml (Spanish, Mexico) * New translations en.yml (Latvian) * New translations simple_form.en.yml (Latvian) * New translations en.yml (Belarusian) * New translations en.json (Serbian (Cyrillic)) * New translations simple_form.en.yml (Serbian (Cyrillic)) * normalize * New translations en.json (German) * New translations en.json (Serbian (Cyrillic)) Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
2022-12-01Fix some performance issues with /admin/instances (#21907)Claire
/admin/instances?availability=failing remains wholly unefficient
2022-11-28Fix expanded statuses not always being scrolled into view (#21797)Claire
2022-11-27Make the 'Trending now' header a link to Explore. (#21759)Connor Shea
This keeps the same design that exists currently, but makes "Trending now" into a link to the Hashtags section of "Explore". Resolves #21758.
2022-11-27Fix infinite loading instead of soft 404 for non-existing remote accounts ↵Claire
(#21303) Fixes #21278, #21021
2022-11-27Fix spaces not being stripped in admin account search (#21324)Claire
Fixes #21058 Regression from #18641
2022-11-27fix gif autoplay on iOS (#21422)James Adney
2022-11-27Add user profile OG tag on status page (#21423)Bramus!
2022-11-27Remove LDSignature on actor Delete activities (#21466)Claire
They are currently not used for anything and represent more than half of the payload size.
2022-11-27Fix “Share @{name}'s profile” profile menu item (#21490)Claire
2022-11-27refactor(vacuum statuses): reduce amount of db queries and load for each ↵Kaspar V
query - improve performance (#21487) * refactor(statuses_vacuum): remove dead code - unused Method is not called inside class and private. Clean up dead code. * refactor(statuses_vacuum): make retention_period present test explicit This private method only hides functionality. It is best practice to be as explicit as possible. * refactor(statuses_vacuum): improve query performance - fix statuses_scope having sub-select for Account.remote scope by `joins(:account).merge(Account.remote)` - fix statuses_scope unnecessary use of `Status.arel_table[:id].lt` because it is inexplicit, bad practice and even slower than normal `.where('statuses.id < ?'` - fix statuses_scope remove select(:id, :visibility) for having reusable active record query batches (no re queries) - fix vacuum_statuses! to use in_batches instead of find_in_batches, because in_batches delivers a full blown active record query result, in stead of an array - no requeries necessary - send(:unlink_from_conversations) not to perform another db query, but reuse the in_batches result instead. - remove now obsolete remove_from_account_conversations method - remove_from_search_index uses array of ids, instead of mapping the ids from an array - this should be more efficient - use the in_batches scope to call delete_all, instead of running another db query for this - because it is again more efficient - add TODO comment for calling models private method with send * refactor(status): simplify unlink_from_conversations - add `has_many through:` relation mentioned_accounts - use model scope local instead of method call `Status#local?` - more readable add account to inbox_owners when account.local? * refactor(status): searchable_by way less sub selects These queries all included a sub-select. Doing the same with a joins should be more efficient. Since this method does 5 such queries, this should be significant, since it technically halves the query count. This is how it was: ```ruby [3] pry(main)> Status.first.mentions.where(account: Account.local, silent: false).explain Status Load (1.6ms) SELECT "statuses".* FROM "statuses" WHERE "statuses"."deleted_at" IS NULL ORDER BY "statuses"."id" DESC LIMIT $1 [["LIMIT", 1]] Mention Load (1.5ms) SELECT "mentions".* FROM "mentions" WHERE "mentions"."status_id" = $1 AND "mentions"."account_id" IN (SELECT "accounts"."id" FROM "accounts" WHERE "accounts"."domain" IS NULL) AND "mentions"."silent" = $2 [["status_id", 109382923142288414], ["silent", false]] => EXPLAIN for: SELECT "mentions".* FROM "mentions" WHERE "mentions"."status_id" = $1 AND "mentions"."account_id" IN (SELECT "accounts"."id" FROM "accounts" WHERE "accounts"."domain" IS NULL) AND "mentions"."silent" = $2 [["status_id", 109382923142288414], ["silent", false]] QUERY PLAN ------------------------------------------------------------------------------------------------------------------ Nested Loop (cost=0.15..23.08 rows=1 width=41) -> Seq Scan on accounts (cost=0.00..10.90 rows=1 width=8) Filter: (domain IS NULL) -> Index Scan using index_mentions_on_account_id_and_status_id on mentions (cost=0.15..8.17 rows=1 width=41) Index Cond: ((account_id = accounts.id) AND (status_id = '109382923142288414'::bigint)) Filter: (NOT silent) (6 rows) ``` This is how it is with this change: ```ruby [4] pry(main)> Status.first.mentions.joins(:account).merge(Account.local).active.explain Status Load (1.7ms) SELECT "statuses".* FROM "statuses" WHERE "statuses"."deleted_at" IS NULL ORDER BY "statuses"."id" DESC LIMIT $1 [["LIMIT", 1]] Mention Load (0.7ms) SELECT "mentions".* FROM "mentions" INNER JOIN "accounts" ON "accounts"."id" = "mentions"."account_id" WHERE "mentions"."status_id" = $1 AND "accounts"."domain" IS NULL AND "mentions"."silent" = $2 [["status_id", 109382923142288414], ["silent", false]] => EXPLAIN for: SELECT "mentions".* FROM "mentions" INNER JOIN "accounts" ON "accounts"."id" = "mentions"."account_id" WHERE "mentions"."status_id" = $1 AND "accounts"."domain" IS NULL AND "mentions"."silent" = $2 [["status_id", 109382923142288414], ["silent", false]] QUERY PLAN ------------------------------------------------------------------------------------------------------------------ Nested Loop (cost=0.15..23.08 rows=1 width=41) -> Seq Scan on accounts (cost=0.00..10.90 rows=1 width=8) Filter: (domain IS NULL) -> Index Scan using index_mentions_on_account_id_and_status_id on mentions (cost=0.15..8.17 rows=1 width=41) Index Cond: ((account_id = accounts.id) AND (status_id = '109382923142288414'::bigint)) Filter: (NOT silent) (6 rows) ```
2022-11-27Fix attachments of edited statuses not being fetched (#21565)Claire
* Fix attachments of edited statuses not being fetched * Fix tests
2022-11-27Fix status mismatch of sensitive check (#21724)kedama
2022-11-26Clear voter count when poll is reset (#21700)afontenot
When a poll is edited, we reset the poll and remove all previous votes. However, prior to this commit, the voter count on the poll was not reset. This leads to incorrect percentages being shown in poll results. Fixes #21696
2022-11-25fix media uploads with ffmpeg 5 (#21191)Skyler Hawthorne