Skip to content
Snippets Groups Projects
  1. Jul 13, 2022
  2. 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.
      Unverified
      02851848
  3. Apr 19, 2022
  4. Mar 21, 2022
  5. Feb 16, 2022
  6. 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
      Unverified
      bc066d89
  7. Dec 25, 2021
  8. 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.
      Unverified
      6c88ebfd
  9. Sep 26, 2021
  10. May 02, 2021
  11. May 01, 2021
  12. Mar 24, 2021
  13. Nov 23, 2020
  14. Nov 12, 2020
  15. Sep 22, 2020
  16. Aug 12, 2020
  17. Aug 11, 2020
  18. Jun 24, 2020
  19. Jun 02, 2020
  20. May 10, 2020
  21. 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
  22. Jul 30, 2019
  23. Jul 15, 2019
  24. May 24, 2019
  25. May 22, 2019
  26. Mar 10, 2019
  27. Mar 08, 2019
  28. Oct 21, 2018
  29. Oct 20, 2018
    • Eugen Rochko's avatar
      Check if port/socket is available before forking in Streaming API (#9023) · 369cc5f5
      Eugen Rochko authored
      Previously, the server would attempt taking port/socket in worker
      process, and if it was taken, fail, which made the master process
      create a new worker. This led to really high CPU usage if the
      streaming API was started when the port or socket were not
      available.
      
      Now, before clustering (forking) into worker processes, a test
      server is created and then removed to check if it can be done.
      Unverified
      369cc5f5
  30. Oct 11, 2018
  31. Oct 07, 2018
    • Eugen Rochko's avatar
      Add conversations API (#8832) · 774ac473
      Eugen Rochko authored
      * Add conversations API
      
      * Add web UI for conversations
      
      * Add test for conversations API
      
      * Add tests for ConversationAccount
      
      * Improve web UI
      
      * Rename ConversationAccount to AccountConversation
      
      * Remove conversations on block and mute
      
      * Change last_status_id to be a denormalization of status_ids
      
      * Add optimistic locking
      Unverified
      774ac473
  32. Aug 26, 2018
  33. Aug 24, 2018
  34. Jul 14, 2018
  35. May 21, 2018
  36. Apr 18, 2018
    • Kaito Sinclaire's avatar
      Direct messages column (#4514) · 156b916c
      Kaito Sinclaire authored
      * Added a timeline for Direct statuses
      * Lists all Direct statuses you've sent and received
      * Displayed in Getting Started
      * Streaming server support for direct TL
      
      * Changes to match other timelines in 2.0
      156b916c
  37. Apr 17, 2018
  38. Dec 13, 2017
Loading