Skip to content
Snippets Groups Projects
  1. Apr 30, 2023
  2. Apr 26, 2023
  3. Mar 06, 2023
  4. Mar 05, 2023
  5. Mar 03, 2023
  6. Feb 11, 2023
  7. Feb 09, 2023
  8. Feb 03, 2023
  9. Dec 18, 2022
  10. Nov 15, 2022
  11. Nov 13, 2022
    • Claire's avatar
      Fix public/local timeline posts not being properly filtered (#20567) · cd5e98db
      Claire authored
      * Fix streaming server using wrong property name for matching filters
      
      Late in the PR, the `filter_results` property has been renamed to `filtered`,
      but the change has not been reflected in the streaming server code.
      
      * Fix filter_action attribute being an integer instead of a string
      cd5e98db
  12. Jul 13, 2022
  13. Jun 28, 2022
    • Claire's avatar
      Revamp post filtering system (#18058) · 02851848
      Claire authored
      * Add model for custom filter keywords
      
      * Use CustomFilterKeyword internally
      
      Does not change the API
      
      * Fix /filters/edit and /filters/new
      
      * Add migration tests
      
      * Remove whole_word column from custom_filters (covered by custom_filter_keywords)
      
      * Redesign /filters
      
      Instead of a list, present a card that displays more information and handles
      multiple keywords per filter.
      
      * Redesign /filters/new and /filters/edit to add and remove keywords
      
      This adds a new gem dependency: cocoon, as well as a npm dependency:
      cocoon-js-vanilla. Those are used to easily populate and remove form fields
      from the user interface when manipulating multiple keyword filters at once.
      
      * Add /api/v2/filters to edit filter with multiple keywords
      
      Entities:
      - `Filter`: `id`, `title`, `filter_action` (either `hide` or `warn`), `context`
        `keywords`
      - `FilterKeyword`: `id`, `keyword`, `whole_word`
      
      API endpoits:
      - `GET /api/v2/filters` to list filters (including keywords)
      - `POST /api/v2/filters` to create a new filter
        `keywords_attributes` can also be passed to create keywords in one request
      - `GET /api/v2/filters/:id` to read a particular filter
      - `PUT /api/v2/filters/:id` to update a new filter
        `keywords_attributes` can also be passed to edit, delete or add keywords in
         one request
      - `DELETE /api/v2/filters/:id` to delete a particular filter
      - `GET /api/v2/filters/:id/keywords` to list keywords for a filter
      - `POST /api/v2/filters/:filter_id/keywords/:id` to add a new keyword to a
         filter
      - `GET /api/v2/filter_keywords/:id` to read a particular keyword
      - `PUT /api/v2/filter_keywords/:id` to edit a particular keyword
      - `DELETE /api/v2/filter_keywords/:id` to delete a particular keyword
      
      * Change from `irreversible` boolean to `action` enum
      
      * Remove irrelevent `irreversible_must_be_within_context` check
      
      * Fix /filters/new and /filters/edit with update for filter_action
      
      * Fix Rubocop/Codeclimate complaining about task names
      
      * Refactor FeedManager#phrase_filtered?
      
      This moves regexp building and filter caching to the `CustomFilter` class.
      
      This does not change the functional behavior yet, but this changes how the
      cache is built, doing per-custom_filter regexps so that filters can be matched
      independently, while still offering caching.
      
      * Perform server-side filtering and output result in REST API
      
      * Fix numerous filters_changed events being sent when editing multiple keywords at once
      
      * Add some tests
      
      * Use the new API in the WebUI
      
      - use client-side logic for filters we have fetched rules for.
        This is so that filter changes can be retroactively applied without
        reloading the UI.
      - use server-side logic for filters we haven't fetched rules for yet
        (e.g. network error, or initial timeline loading)
      
      * Minor optimizations and refactoring
      
      * Perform server-side filtering on the streaming server
      
      * Change the wording of filter action labels
      
      * Fix issues pointed out by linter
      
      * Change design of “Show anyway” link in accordence to review comments
      
      * Drop “irreversible” filtering behavior
      
      * Move /api/v2/filter_keywords to /api/v1/filters/keywords
      
      * Rename `filter_results` attribute to `filtered`
      
      * Rename REST::LegacyFilterSerializer to REST::V1::FilterSerializer
      
      * Fix systemChannelId value in streaming server
      
      * Simplify code by removing client-side filtering code
      
      The simplifcation comes at a cost though: filters aren't retroactively
      applied anymore.
      02851848
  14. Apr 19, 2022
  15. Mar 21, 2022
  16. Feb 16, 2022
  17. Jan 07, 2022
    • Claire's avatar
      Fix timeline streaming stopping for multiple sessions instead of one (#17259) · bc066d89
      Claire authored
      * Fix timeline streaming stopping for multiple sessions instead of one
      
      Fixes #17256.
      
      In updating the code for a newer version of node-redis, #17183 also broke
      redis subscription management when multiple streaming clients subscribe to the
      same channel.
      
      This commit restores the redis subscription management code.
      
      * Let node-redis actually handle the subscriptions
      bc066d89
  18. Dec 25, 2021
  19. Oct 13, 2021
    • Sasha Sorokin's avatar
      fix(streaming): req.scopes can be nullable (#16823) · 6c88ebfd
      Sasha Sorokin authored
      When checking for required OAuth scopes, an unexpected error could
      happen due to missing (null-y) req.scopes. This commit fixes that by
      checking if req.scopes are present before checking if any required
      scopes are present, otherwise it skips that straight to rejection.
      6c88ebfd
  20. Sep 26, 2021
  21. May 02, 2021
  22. May 01, 2021
  23. Mar 24, 2021
  24. Nov 23, 2020
  25. Nov 12, 2020
  26. Sep 22, 2020
  27. Aug 12, 2020
  28. Aug 11, 2020
  29. Jun 24, 2020
    • ThibG's avatar
      Change streaming server to treat blank redis password as password-less auth (#14135) · ddcdddd6
      ThibG authored
      Fixes #14131
      
      Our `mastodon:setup` task defaults to a blank password rather than the
      absence of password, but some versions of Redis reject blank password
      authentication when authentication is possible without a password.
      
      The Ruby code only uses the Redis password when it's not blank, so
      do the same for the node.js part.
      ddcdddd6
  30. Jun 02, 2020
  31. May 10, 2020
  32. Jan 24, 2020
    • Ben Lubar's avatar
      minor server-sent events fixes (#12945) · 0dfba088
      Ben Lubar authored
      * Send output on the server-sent events stream immediately so the client sees that it was successfully opened even if it doesn't have any messages.
      
      Fix transparent SSE streaming for the public:local and hashtag:local stream types.
      
      * Tell caches to never store server-sent events.
      0dfba088
  33. Jul 30, 2019
  34. Jul 15, 2019
  35. May 24, 2019
  36. May 22, 2019
  37. Mar 10, 2019
Loading