Skip to content
Extraits de code Groupes Projets
  1. nov. 05, 2021
  2. mai 10, 2021
  3. mai 07, 2021
  4. avr. 24, 2021
  5. mars 03, 2021
  6. fév. 24, 2021
    • Claire's avatar
      Change ResolveAccountService's handling of skip_webfinger (#15750) · 5f4c0b79
      Claire a rédigé
      * Change ResolveAccountService's handling of skip_webfinger
      
      Change it so it never makes any webfinger query, as the name would imply.
      
      * Add tests
      
      * Change FollowService to not take an URI for target_account
      
      * Restore domain-block check in FollowService
      
      * Fix tests
      5f4c0b79
  7. déc. 22, 2020
  8. déc. 21, 2020
  9. déc. 18, 2020
  10. déc. 17, 2020
    • ThibG's avatar
      Improve searching for private toots from URL (#14856) · b1feb470
      ThibG a rédigé
      
      * Improve searching for private toots from URL
      
      Most of the time, when sharing toots, people use the toot URL rather than
      the toot URI, which makes sense since it is the user-facing URL.
      
      In Mastodon's case, the URL and URI are different, and Mastodon does not
      have an index on URL, which means searching a private toot by URL is done
      with a slow query that will only succeed for very recent toots.
      
      This change gets rid of the slow query, and attempts to guess the URI from
      URL instead, as Mastodon's are predictable.
      
      * Add tests
      
      * Only return status with guessed uri if url matches
      
      Co-authored-by: default avatarClaire <claire.github-309c@sitedethib.com>
      b1feb470
  11. nov. 19, 2020
    • ThibG's avatar
      Fix webfinger redirect handling in ResolveAccountService (#15187) · 8b8004a9
      ThibG a rédigé
      * Fix webfinger redirect handling in ResolveAccountService
      
      ResolveAccountService#process_webfinger! handled a one-step webfinger
      redirection, but only accepting the result if it matched the exact URI passed
      as input, defeating the point of a redirection check.
      
      Instead, use the same logic as in `ActivityPub::FetchRemoteAccountService`,
      updating the resulting `acct:` URI with the result of the first webfinger
      query.
      
      * Add tests
      8b8004a9
    • ThibG's avatar
      Add import/export feature for bookmarks (#14956) · 96c1e713
      ThibG a rédigé
      * Add ability to export bookmarks
      
      * Add support for importing bookmarks
      
      * Add bookmark import tests
      
      * Add bookmarks export test
      96c1e713
  12. nov. 07, 2020
  13. oct. 21, 2020
    • ThibG's avatar
      Add follower synchronization mechanism (#14510) · ca565271
      ThibG a rédigé
      * Add support for followers synchronization on the receiving end
      
      Check the `collectionSynchronization` attribute on `Create` and `Announce`
      activities and synchronize followers from provided collection if possible.
      
      * Add tests for followers synchronization on the receiving end
      
      * Add support for follower synchronization on the sender's end
      
      * Add tests for the sending end
      
      * Switch from AS attributes to HTTP header
      
      Replace the custom `collectionSynchronization` ActivityStreams attribute by
      an HTTP header (`X-AS-Collection-Synchronization`) with the same syntax as
      the `Signature` header and the following fields:
      - `collectionId` to specify which collection to synchronize
      - `digest` for the SHA256 hex-digest of the list of followers known on the
         receiving instance (where “receiving instance” is determined by accounts
         sharing the same host name for their ActivityPub actor `id`)
      - `url` of a collection that should be fetched by the instance actor
      
      Internally, move away from the webfinger-based `domain` attribute and use
      account `uri` prefix to group accounts.
      
      * Add environment variable to disable followers synchronization
      
      Since the whole mechanism relies on some new preconditions that, in some
      extremely rare cases, might not be met, add an environment variable
      (DISABLE_FOLLOWERS_SYNCHRONIZATION) to disable the mechanism altogether and
      avoid followers being incorrectly removed.
      
      The current conditions are:
      1. all managed accounts' actor `id` and inbox URL have the same URI scheme and
         netloc.
      2. all accounts whose actor `id` or inbox URL share the same URI scheme and
         netloc as a managed account must be managed by the same Mastodon instance
         as well.
      
      As far as Mastodon is concerned, breaking those preconditions require extensive
      configuration changes in the reverse proxy and might also cause other issues.
      
      Therefore, this environment variable provides a way out for people with highly
      unusual configurations, and can be safely ignored for the overwhelming majority
      of Mastodon administrators.
      
      * Only set follower synchronization header on non-public statuses
      
      This is to avoid unnecessary computations and allow Follow-related
      activities to be handled by the usual codepath instead of going through
      the synchronization mechanism (otherwise, any Follow/Undo/Accept activity
      would trigger the synchronization mechanism even if processing the activity
      itself would be enough to re-introduce synchronization)
      
      * Change how ActivityPub::SynchronizeFollowersService handles follow requests
      
      If the remote lists a local follower which we only know has sent a follow
      request, consider the follow request as accepted instead of sending an Undo.
      
      * Integrate review feeback
      
      - rename X-AS-Collection-Synchronization to Collection-Synchronization
      - various minor refactoring and code style changes
      
      * Only select required fields when computing followers_hash
      
      * Use actor URI rather than webfinger domain in synchronization endpoint
      
      * Change hash computation to be a XOR of individual hashes
      
      Makes it much easier to be memory-efficient, and avoid sorting discrepancy issues.
      
      * Marginally improve followers_hash computation speed
      
      * Further improve hash computation performances by using pluck_each
      ca565271
  14. oct. 12, 2020
  15. sept. 18, 2020
  16. sept. 15, 2020
  17. sept. 07, 2020
  18. sept. 04, 2020
  19. juil. 15, 2020
  20. juil. 07, 2020
  21. juin 09, 2020
    • ThibG's avatar
      Make domain block/silence/reject-media code more robust (#13424) · 89f40b6c
      ThibG a rédigé
      * Split media cleanup from reject-media domain blocks to its own service
      
      * Slightly improve ClearDomainMediaService error handling
      
      * Lower DomainClearMediaWorker to lowest-priority queue
      
      * Do not catch ActiveRecord::RecordNotFound in domain block workers
      
      * Fix DomainBlockWorker spec labels
      
      * Add some specs
      
      * Change domain blocks to immediately mark accounts as suspended
      
      Rather than doing so sequentially, account after account, while cleaning
      their data. This doesn't change much about the time the block takes to
      complete, but it immediately prevents interaction with the blocked domain,
      while up to now, it would only be guaranteed when the process ends.
      89f40b6c
  22. mai 14, 2020
  23. avr. 25, 2020
  24. mars 31, 2020
  25. mars 25, 2020
    • ThibG's avatar
      Fix media not being marked sensitive when client sets a CW but no text (#13277) · f08f880f
      ThibG a rédigé
      Mastodon enforces the “sensitive” flag on media attachments whenever a toot
      is posted with a Content Warning. However, it does so *after* potentially
      converting the Content Warning to toot text (when there is no toot text),
      which leads to inconsistent and surprising behavior for API clients.
      This commit fixes this inconsistency.
      f08f880f
  26. jan. 23, 2020
  27. déc. 30, 2019
  28. déc. 17, 2019
    • ThibG's avatar
      Clean up OStatus-related codepaths (#12173) · 2ee5a9d9
      ThibG a rédigé
      * Remove “protocol” argument and return value, as only ActivityPub is supported
      
      * Remove FetchRemoteAccountService, only use ActivityPub::FetchRemoteAccountService
      
      * Fix tests
      2ee5a9d9
  29. déc. 16, 2019
  30. nov. 21, 2019
  31. nov. 17, 2019
    • Eugen Rochko's avatar
      Add cache for OEmbed endpoints to avoid extra HTTP requests (#12403) · d14e74ef
      Eugen Rochko a rédigé
      * add youtube oembed endpoint
      
      * add check for oembed endpoint
      
      * change unless for a more readable if
      
      * clear blank lines
      
      * endpoint via https
      
      * Fix string literal in condition
      
      * use cache for endpoints
      
      * use cache for endpoints
      
      * clean up and adding check
      
      * clean up and remove redundant return
      
      * add html check
      
      * add false to return
      
      * use double quotes
      
      * use double quotes
      
      * Clean up
      d14e74ef
  32. oct. 24, 2019
  33. oct. 03, 2019
  34. oct. 01, 2019
  35. sept. 27, 2019
    • Eugen Rochko's avatar
      Add `exclude_unreviewed` param to `GET /api/v2/search` REST API (#11977) · ab33c4df
      Eugen Rochko a rédigé
      Make it so normal search returns even unreviewed matches, but
      autosuggestions do not.
      
      Fix #11960
      ab33c4df
    • ThibG's avatar
      Change silences to always require approval on follow (#11975) · 18b451c0
      ThibG a rédigé
      * Change silenced accounts to require approval on follow
      
      * Also require approval for follows by people explicitly muted by target accounts
      
      * Do not auto-accept silenced or muted accounts when switching from locked to unlocked
      
      * Add `follow_requests_count` to verify_credentials
      
      * Show “Follow requests” menu item if needed even if account is locked
      
      * Add tests
      
      * Correctly reflect that follow requests weren't auto-accepted when local account is silenced
      
      * Accept follow requests from user-muted accounts to avoid leaking mutes
      18b451c0
  36. août 15, 2019
    • Eugen Rochko's avatar
      Add more accurate account search (#11537) · 8fdff274
      Eugen Rochko a rédigé
      * Add more accurate account search
      
      When ElasticSearch is available, a more accurate search is implemented:
      
      - Using edge n-gram index for acct and display name
      - Using asciifolding and cjk width normalization on display names
      - Using Gaussian decay on account activity for additional scoring (recency)
      - Using followers/friends ratio for additional scoring (spamminess)
      - Using followers number for additional scoring (size)
      
      The exact match precedence only takes effect when the input conforms
      to the username format and the username part of it is complete, i.e.
      when the user started typing the domain part.
      
      * Support single-letter usernames
      
      * Fix tests
      
      * Fix not picking up account updates
      
      * Add weights and normalization for scores, skip zero terms queries
      
      * Use local counts for accounts index, adjust search parameters
      
      * Fix mistakes
      
      * Using updated_at of accounts is inadequate for remote accounts
      8fdff274
Chargement en cours