Skip to content
Snippets Groups Projects
  1. Dec 02, 2022
  2. Dec 01, 2022
  3. Nov 30, 2022
  4. Nov 28, 2022
  5. Nov 27, 2022
    • Connor Shea's avatar
      Make the 'Trending now' header a link to Explore. (#21759) · cec1e902
      Connor Shea authored
      This keeps the same design that exists currently, but makes "Trending
      now" into a link to the Hashtags section of "Explore".
      
      Resolves #21758.
      Unverified
      cec1e902
    • Claire's avatar
      Unverified
      3ffaa966
    • Claire's avatar
      Fix spaces not being stripped in admin account search (#21324) · 57b893d5
      Claire authored
      Fixes #21058
      
      Regression from #18641
      Unverified
      57b893d5
    • James Adney's avatar
      fix gif autoplay on iOS (#21422) · c0dcf15d
      James Adney authored
      Unverified
      c0dcf15d
    • Bramus!'s avatar
      Add user profile OG tag on status page (#21423) · e617ee7f
      Bramus! authored
      Unverified
      e617ee7f
    • Claire's avatar
      Remove LDSignature on actor Delete activities (#21466) · f4f2b062
      Claire authored
      They are currently not used for anything and represent more than half of the
      payload size.
      Unverified
      f4f2b062
    • Claire's avatar
    • Claire's avatar
      Remove support for Ruby 2.6 (#21477) · 098ced74
      Claire authored
      As pointed out by https://github.com/mastodon/mastodon/pull/21297#discussion_r1028372193
      at least one of our dependencies already dropped support for Ruby 2.6, and we
      had removed Ruby 2.6 tests from the CI over a year ago (#16861).
      
      So stop advertising Ruby 2.6 support, bump targeted version, and drop some
      compatibility code.
      Unverified
      098ced74
    • Kaspar V's avatar
      refactor(vacuum statuses): reduce amount of db queries and load for each query... · 47f0d702
      Kaspar V authored
      refactor(vacuum statuses): reduce amount of db queries and load for each 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)
      ```
      Unverified
      47f0d702
    • Claire's avatar
      Fix attachments of edited statuses not being fetched (#21565) · 625216d8
      Claire authored
      * Fix attachments of edited statuses not being fetched
      
      * Fix tests
      Unverified
      625216d8
    • Claire's avatar
      Add logging for Rails cache timeouts (#21667) · d587a268
      Claire authored
      * Reduce redis cache store connect timeout from default 20 seconds to 5 seconds
      
      * Log cache store errors
      Unverified
      d587a268
    • kedama's avatar
      Fix status mismatch of sensitive check (#21724) · 14e2354e
      kedama authored
      Unverified
      14e2354e
  6. Nov 26, 2022
    • afontenot's avatar
      Clear voter count when poll is reset (#21700) · f17fc574
      afontenot authored
      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
      Unverified
      f17fc574
Loading