Commits on Dec 15, 2022

  1. Build(deps): Bump faraday from 2.7.1 to 2.7.2 (#19474)

    Bumps [faraday](https://github.com/lostisland/faraday) from 2.7.1 to 2.7.2.
    - [Release notes](https://github.com/lostisland/faraday/releases)
    - [Changelog](https://github.com/lostisland/faraday/blob/main/CHANGELOG.md)
    - [Commits](lostisland/faraday@v2.7.1...v2.7.2)
    
    ---
    updated-dependencies:
    - dependency-name: faraday
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    644237b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ef62c85 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9806b5 View commit details
    Browse the repository at this point in the history
  4. FEATURE: Send notifications to admins when new features are released (#…

    …19460)
    
    This commit adds a new notification that gets sent to admins when the site gets new features after an upgrade/deploy. Clicking on the notification takes the admin to the admin dashboard at `/admin` where they can see the new features under the "New Features" section.
    
    Internal topic: t/87166.
    OsamaSayegh authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    1c03d6f View commit details
    Browse the repository at this point in the history
  5. Build(deps): Bump rotp from 6.2.1 to 6.2.2 (#19473)

    Bumps [rotp](https://github.com/mdp/rotp) from 6.2.1 to 6.2.2.
    - [Release notes](https://github.com/mdp/rotp/releases)
    - [Changelog](https://github.com/mdp/rotp/blob/main/CHANGELOG.md)
    - [Commits](mdp/rotp@v6.2.1...v6.2.2)
    
    ---
    updated-dependencies:
    - dependency-name: rotp
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    8126c16 View commit details
    Browse the repository at this point in the history
  6. UX: Add tooltip why file upload is disabled (#19471)

    Follow up to commit 0cc6e67.
    nbianca authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    1f6e9bd View commit details
    Browse the repository at this point in the history
  7. FIX: FIX: Correctly parse Mandrill webhooks (#17116)

    Mandrill sends webhook messages as a URL-encoded body, with the
    mandrill_events property as an encoded JSON array.
    Regalijan authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    983a56e View commit details
    Browse the repository at this point in the history
  8. 1 Configuration menu
    Copy the full SHA
    b1e0836 View commit details
    Browse the repository at this point in the history
  9. FIX: Remove user_option saving for bookmark auto delete pref (#19476)

    We were changing the user's user_option.bookmark_auto_delete_preference
    to whatever they changed it to in the bookmark modal to use as default
    for future bookmarks. However this was leading to a lot of confusion
    since if you wanted to set it for one bookmark you had to remember to
    change it back on the next one.
    
    This commit removes that automatic functionality, and instead moves
    the bookmark auto delete preference to User Preferences > Interface
    in an explicit dropdown.
    martin-brennan authored Dec 15, 2022
    Configuration menu
    Copy the full SHA
    624b1b3 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2022

  1. FIX: Scroll autocomplete container on arrow press (#19478)

    The autocomplete container has not needed to be
    scrolled with arrow keys until we introduced the new
    hashtag autocomplete, which shows more options and allows
    scrolling. This commit scrolls the options up/down when
    selecting an item outside the scroll with arrow keys.
    martin-brennan authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    dcc9611 View commit details
    Browse the repository at this point in the history
  2. FIX: Allow backspace into hashtag autocomplete (#19489)

    Way back in 9010037 when
    we first added hashtag autocompletion, we added a rule to
    say we should not trigger autocomplete when backspacing into
    a hashtag. I think this is because we used to also not trigger
    it at the start of the line because of how markdown headers
    used to work. We removed this rule in 6f0b9bb
    so we are safe to remove the backspace exception here too.
    Now you can backspace into a hashtag to trigger the autocomplete.
    martin-brennan authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    98e3e90 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4edeb7d View commit details
    Browse the repository at this point in the history
  4. FEATURE: Add support for desktop push notifications in core (#19375)

    * FEATURE: Add support for desktop push notifications in core
    
    Default to push for live notifications on desktop if available and
    `enable_desktop_push_notifications` site setting set to true.
    
    This removes the need for desktop-push-notifications plugin.
    
    * DEV: Ensure live notifications are enabled explicitly
    
    Allow a user with push notification access who has directly
    enabled notifications via the browser settings to trigger push subscription
    flow.
    s3lase authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    382757d View commit details
    Browse the repository at this point in the history
  5. FIX: Remove magic time ranges (#19477)

    In #15474 we introduced dedicated support for date ranges. As part of that
    change we added a fallback of "magic" date ranges, which treats dates in
    any paragraph with exactly two dates as a range. There were discussions
    about migrating all such paragraphs to use the new date range element, but
    it was ultimately decided against.
    
    This change removes the fallback and, as a bonus, adds support for multiple
    date ranges in the same paragraph.
    Drenmi authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    bb32879 View commit details
    Browse the repository at this point in the history
  6. Build(deps): Bump sinon from 15.0.0 to 15.0.1 in /app/assets/javascri…

    …pts (#19485)
    
    Bumps [sinon](https://github.com/sinonjs/sinon) from 15.0.0 to 15.0.1.
    - [Release notes](https://github.com/sinonjs/sinon/releases)
    - [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
    - [Commits](sinonjs/sinon@v15.0.0...v15.0.1)
    
    ---
    updated-dependencies:
    - dependency-name: sinon
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    3c6ef38 View commit details
    Browse the repository at this point in the history
  7. DEV: Add helpers for system testing in plugins (#19421)

    Add helpers for system testing in plugins
    nattsw authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    0ee050e View commit details
    Browse the repository at this point in the history
  8. DEV: Promote historic post_deploy migrations (#19492)

    This commit promotes all post_deploy migrations which existed in
    Discourse v2.8.0 (timestamp <= 20220107014925).
    
    This commit includes a fix to the promote_migrations script to promote
    all migrations of the first version of the previous stable version. For
    example, if the current stable version is v2.8.13, the version used as
    a cutoff for promoting migrations is v2.8.0.
    nbianca authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    c358151 View commit details
    Browse the repository at this point in the history
  9. FEATURE: integrate DnD with user status (#19410)

    This PR adds a new "Pause notifications" checkbox to the user status modal. This checkbox allows enabling the Do-Not-Disturb mode together with user status. Note that we don't remove and don't rename the existing DnD menu item in this PR, so the old way of entering the DnD mode is still available.
    
    Also, we're not making DnD mode a part of user status on backend and in database. The reason is that the DnD mode should still be available on sites with disabled user status, having them separated helps keep the implementation simple.
    AndrewPrigorshnev authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    4908a66 View commit details
    Browse the repository at this point in the history
  10. UX: rename "Do Not Disturb" to "Pause Notifications" (#19483)

    We decided to rename the "Do Not Disturb" mode to "Pause Notifications". I am starting from changing strings on the client, that will update user interface. And I'm going to do renamings in frontend and backend code after some time.
    AndrewPrigorshnev authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    2d628c8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e6439e8 View commit details
    Browse the repository at this point in the history
  12. FIX: a string usage that was lost during git merge (#19493)

    I've somehow lost this change when merging 2d628c8.
    AndrewPrigorshnev authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    51c20ef View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9370c91 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    947711a View commit details
    Browse the repository at this point in the history
  15. DEV: Remove enable_whispers site setting (#19196)

    * DEV: Remove enable_whispers site setting
    
    Whispers are enabled as long as there is at least one group allowed to
    whisper, see whispers_allowed_groups site setting.
    
    * DEV: Always enable whispers for admins if at least one group is allowed.
    nbianca authored Dec 16, 2022
    Configuration menu
    Copy the full SHA
    b80765f View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    b8c1289 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2022

  1. Build(deps): Bump rspec-expectations from 3.12.0 to 3.12.1 (#19504)

    Bumps [rspec-expectations](https://github.com/rspec/rspec-expectations) from 3.12.0 to 3.12.1.
    - [Release notes](https://github.com/rspec/rspec-expectations/releases)
    - [Changelog](https://github.com/rspec/rspec-expectations/blob/main/Changelog.md)
    - [Commits](rspec/rspec-expectations@v3.12.0...v3.12.1)
    
    ---
    updated-dependencies:
    - dependency-name: rspec-expectations
      dependency-type: indirect
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 18, 2022
    Configuration menu
    Copy the full SHA
    10ae732 View commit details
    Browse the repository at this point in the history
  2. Build(deps): Bump rack-protection from 3.0.4 to 3.0.5 (#19503)

    Bumps [rack-protection](https://github.com/sinatra/sinatra) from 3.0.4 to 3.0.5.
    - [Release notes](https://github.com/sinatra/sinatra/releases)
    - [Changelog](https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md)
    - [Commits](sinatra/sinatra@v3.0.4...v3.0.5)
    
    ---
    updated-dependencies:
    - dependency-name: rack-protection
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 18, 2022
    Configuration menu
    Copy the full SHA
    3f7d04e View commit details
    Browse the repository at this point in the history
  3. Build(deps-dev): Bump shoulda-matchers from 5.2.0 to 5.3.0 (#19505)

    Bumps [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) from 5.2.0 to 5.3.0.
    - [Release notes](https://github.com/thoughtbot/shoulda-matchers/releases)
    - [Changelog](https://github.com/thoughtbot/shoulda-matchers/blob/main/CHANGELOG.md)
    - [Commits](thoughtbot/shoulda-matchers@v5.2.0...v5.3.0)
    
    ---
    updated-dependencies:
    - dependency-name: shoulda-matchers
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 18, 2022
    Configuration menu
    Copy the full SHA
    898e544 View commit details
    Browse the repository at this point in the history
  4. Build(deps): Bump eslint in /app/assets/javascripts (#19506)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.29.0 to 8.30.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.29.0...v8.30.0)
    
    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 18, 2022
    Configuration menu
    Copy the full SHA
    8896b59 View commit details
    Browse the repository at this point in the history
  5. Build(deps): Bump sass from 1.56.2 to 1.57.0 in /app/assets/javascrip…

    …ts (#19507)
    
    Bumps [sass](https://github.com/sass/dart-sass) from 1.56.2 to 1.57.0.
    - [Release notes](https://github.com/sass/dart-sass/releases)
    - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
    - [Commits](sass/dart-sass@1.56.2...1.57.0)
    
    ---
    updated-dependencies:
    - dependency-name: sass
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 18, 2022
    Configuration menu
    Copy the full SHA
    4adb457 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2022

  1. FIX: access to category chat only when user can create post (#19488)

    Previously, restricted category chat channel was available for all groups - even `readonly`. From now on, only user who belong to group with `create_post` or `full` permissions can access that chat channel.
    lis2 authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    09d15d4 View commit details
    Browse the repository at this point in the history
  2. FIX: Add missing user_id args for ChatMessage.cook (#19508)

    In both ChatMessage#rebake! and in ChatMessageProcessor
    when we were calling ChatMessage.cook we were missing the
    user_id to cook with, which causes missed hashtag cooks
    because of missing permissions.
    martin-brennan authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    baf78d3 View commit details
    Browse the repository at this point in the history
  3. DEV: Add missing test case (#19510)

    Follow-up to f77660b
    tgxworld authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    5bd29b8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    68d5bde View commit details
    Browse the repository at this point in the history
  5. DEV: Change HashtagAutocompleteService to use DiscoursePluginRegistry (

    …#19491)
    
    Follow up to a review in #18937, this commit changes the HashtagAutocompleteService to no longer use class variables to register hashtag data sources or types in context priority order. This is to address multisite concerns, where one site could e.g. have chat disabled and another might not. The filtered plugin registers I added will not be included if the plugin is disabled.
    martin-brennan authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    6b9c0ee View commit details
    Browse the repository at this point in the history
  6. FIX: discourse-follow notification types (#19513)

    Bring information about discourse-follow notification types to Core
    
    https://github.com/discourse/discourse-follow/blob/main/plugin.rb#L32
    lis2 authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    a6edd6e View commit details
    Browse the repository at this point in the history
  7. PERF: Remove unnecessary DB queries when preloading for chat (#19514)

    Use `Chat::ChatChannelFetcher.secured_public_channel_search` directly
    checking for existence instead of running through
    `Chat::ChatChannelFetcher.secured_public_channels` which executes 7 more
    DB queries.
    tgxworld authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    4ea6b09 View commit details
    Browse the repository at this point in the history
  8. DEV: Update @ember/test-helpers and fix chat test (#19495)

    We were triggering a `/` key press and it was passing because of 1. a bug in `@ember/test-helpers` and 2. how we handle events in chat
    
    Dependabot PR description:
    
    Build(deps): Bump @ember/test-helpers in /app/assets/javascripts
    
    Bumps [@ember/test-helpers](https://github.com/emberjs/ember-test-helpers) from 2.8.1 to 2.9.1.
    - [Release notes](https://github.com/emberjs/ember-test-helpers/releases)
    - [Changelog](https://github.com/emberjs/ember-test-helpers/blob/master/CHANGELOG.md)
    - [Commits](emberjs/ember-test-helpers@v2.8.1...v2.9.1)
    
    ---
    updated-dependencies:
    - dependency-name: "@ember/test-helpers"
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Jarek Radosz <jradosz@gmail.com>
    dependabot[bot] and CvX authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    c595749 View commit details
    Browse the repository at this point in the history
  9. UX: Hashtag autocomplete styling (#19426)

    * UX: added fadeout + hashtag styling
    
    UX: add full name to autocomplete
    
    UX: autocomplete mentions styling
    
    UX: emoji styling user status
    
    UX: autocomplete emoji
    
    * DEV: Move hashtag tag counts into new secondary_text prop
    
    * FIX: Add is-online style to mention users via chat
    
    UX: make is-online avatar styling globally available
    
    * DEV: Fix specs
    
    * DEV: Test fix
    
    Co-authored-by: Martin Brennan <martin@discourse.org>
    chapoi and martin-brennan authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    8db1f18 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3c43bee View commit details
    Browse the repository at this point in the history
  11. Build(deps): Bump net-http from 0.2.2 to 0.3.2 (#19518)

    Bumps [net-http](https://github.com/ruby/net-http) from 0.2.2 to 0.3.2.
    - [Release notes](https://github.com/ruby/net-http/releases)
    - [Commits](ruby/net-http@v0.2.2...v0.3.2)
    
    ---
    updated-dependencies:
    - dependency-name: net-http
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    ---
    
    Update spec stubs
    
    To account for changes in ruby/net-http@65aed40
    
    ---
    
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: David Taylor <david@taylorhq.com>
    dependabot[bot] and davidtaylorhq authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    43a8ca0 View commit details
    Browse the repository at this point in the history
  12. UX: Redesign and refactor penalty modals (#19458)

    This merges the two modals code to remove duplication and implements
    a more consistent design.
    nbianca authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    1ad06eb View commit details
    Browse the repository at this point in the history
  13. Build(deps): Bump ember-qunit in /app/assets/javascripts (#19519)

    Bumps [ember-qunit](https://github.com/emberjs/ember-qunit) from 6.0.0 to 6.1.1.
    - [Release notes](https://github.com/emberjs/ember-qunit/releases)
    - [Changelog](https://github.com/emberjs/ember-qunit/blob/master/CHANGELOG.md)
    - [Commits](emberjs/ember-qunit@v6.0.0...v6.1.1)
    
    ---
    updated-dependencies:
    - dependency-name: ember-qunit
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    155c400 View commit details
    Browse the repository at this point in the history
  14. FIX: Don't validate channel slug if it hasn't changed (#19498)

    This is generating lots of log noise for operations that aren't even
    touching the slug.
    danielwaterworth authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    d244eb0 View commit details
    Browse the repository at this point in the history
  15. FIX: Don't assume a clean slate in tests (#19499)

    since plugins can have fixtures
    danielwaterworth authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    97c5e19 View commit details
    Browse the repository at this point in the history
  16. DEV: Promote historic post_deploy migrations (#19496)

    This commit promotes all post_deploy migrations which existed in
    Discourse v2.8.0 (timestamp <= 20220107014925)
    nbianca authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    3742213 View commit details
    Browse the repository at this point in the history
  17. DEV: Skip push notifications for active online users (#19502)

    * DEV: Skip push notifications for active online users
    
    Currently, users with active push subscriptions get push notifications
    regardless of their "presence" on the site.
    
    This change introduces a `push_notification_time_window_mins`
    site setting which is used in conjunction with a user's `last_seen_at` to
    determine if push notifications should be sent. A user is considered to
    be actively online if their `last_seen_at` is within `push_notification_time_window_mins`
    minutes. `push_notification_time_window_mins` is set to 10 by default.
    
    * DEV: Remove client param for push_notification_time_window_mins site setting
    
    Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com>
    
    Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com>
    s3lase and nbianca authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    7ba1157 View commit details
    Browse the repository at this point in the history
  18. PERF: Add index for chat unread counts query (#19516)

    This commit adds an index for the query which the chat plugin executes
    multiple times when preloading user data in `Chat::ChatChannelFetcher.unread_counts`.
    
    Sample query plan from a query I grabbed from one of our production
    instance.
    
    Before:
    
    ```
                                                                                            QUERY PLAN
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     GroupAggregate  (cost=10.77..696.67 rows=7 width=16) (actual time=7.735..7.736 rows=0 loops=1)
       Group Key: cc.id
       ->  Nested Loop  (cost=10.77..696.54 rows=12 width=8) (actual time=7.734..7.735 rows=0 loops=1)
             Join Filter: (cc.id = cm.chat_channel_id)
             ->  Nested Loop  (cost=0.56..76.44 rows=1 width=16) (actual time=0.011..0.037 rows=7 loops=1)
                   ->  Index Only Scan using chat_channels_pkey on chat_channels cc  (cost=0.28..22.08 rows=7 width=8) (actual time=0.004..0.014 rows=7 loops=1)
                         Index Cond: (id = ANY ('{192,300,228,727,8,612,1633}'::bigint[]))
                         Heap Fetches: 0
                   ->  Index Scan using user_chat_channel_unique_memberships on user_chat_channel_memberships uccm  (cost=0.28..7.73 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=7)
                         Index Cond: ((user_id = 1338) AND (chat_channel_id = cc.id))
             ->  Bitmap Heap Scan on chat_messages cm  (cost=10.21..618.98 rows=89 width=12) (actual time=1.096..1.097 rows=0 loops=7)
                   Recheck Cond: (chat_channel_id = uccm.chat_channel_id)
                   Filter: ((deleted_at IS NULL) AND (user_id <> 1338) AND (id > COALESCE(uccm.last_read_message_id, 0)))
                   Rows Removed by Filter: 2085
                   Heap Blocks: exact=7106
                   ->  Bitmap Index Scan on index_chat_messages_on_chat_channel_id_and_created_at  (cost=0.00..10.19 rows=270 width=0) (actual time=0.114..0.114 rows=2085 loops=7)
                         Index Cond: (chat_channel_id = uccm.chat_channel_id)
     Planning Time: 0.408 ms
     Execution Time: 7.762 ms
    (19 rows)
    ```
    
    After:
    
    ```
                                                                                            QUERY PLAN
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     GroupAggregate  (cost=5.84..367.39 rows=7 width=16) (actual time=0.130..0.131 rows=0 loops=1)
       Group Key: cc.id
       ->  Nested Loop  (cost=5.84..367.26 rows=12 width=8) (actual time=0.129..0.130 rows=0 loops=1)
             Join Filter: (cc.id = cm.chat_channel_id)
             ->  Nested Loop  (cost=0.56..76.44 rows=1 width=16) (actual time=0.038..0.069 rows=7 loops=1)
                   ->  Index Only Scan using chat_channels_pkey on chat_channels cc  (cost=0.28..22.08 rows=7 width=8) (actual time=0.011..0.022 rows=7 loops=1)
                         Index Cond: (id = ANY ('{192,300,228,727,8,612,1633}'::bigint[]))
                         Heap Fetches: 0
                   ->  Index Scan using user_chat_channel_unique_memberships on user_chat_channel_memberships uccm  (cost=0.28..7.73 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=7)
                         Index Cond: ((user_id = 1338) AND (chat_channel_id = cc.id))
             ->  Bitmap Heap Scan on chat_messages cm  (cost=5.28..289.71 rows=89 width=12) (actual time=0.008..0.008 rows=0 loops=7)
                   Recheck Cond: ((chat_channel_id = uccm.chat_channel_id) AND (id > COALESCE(uccm.last_read_message_id, 0)) AND (deleted_at IS NULL))
                   Filter: (user_id <> 1338)
                   ->  Bitmap Index Scan on index_chat_messages_on_chat_channel_id_and_id  (cost=0.00..5.26 rows=90 width=0) (actual time=0.008..0.008 rows=0 loops=7)
                         Index Cond: ((chat_channel_id = uccm.chat_channel_id) AND (id > COALESCE(uccm.last_read_message_id, 0)))
     Planning Time: 1.217 ms
     Execution Time: 0.188 ms
    (17 rows)
    ```
    tgxworld authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    80d289e View commit details
    Browse the repository at this point in the history
  19. Build(deps-dev): Bump ruby-prof from 1.4.3 to 1.4.4 (#19522)

    Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.4.3 to 1.4.4.
    - [Release notes](https://github.com/ruby-prof/ruby-prof/releases)
    - [Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
    - [Commits](ruby-prof/ruby-prof@1.4.3...1.4.4)
    
    ---
    updated-dependencies:
    - dependency-name: ruby-prof
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    e30c5f8 View commit details
    Browse the repository at this point in the history
  20. PERF: Remove unnecessary SQL UNION query when search public channels (#…

    …19515)
    
    It is pointless to include DM channels because the query for public
    channel search restricts chatable type to `Category`.
    tgxworld authored Dec 19, 2022
    Configuration menu
    Copy the full SHA
    a176ce2 View commit details
    Browse the repository at this point in the history