discourse/spec
Martin Brennan c6c633e041
FIX: Issues with incorrect unread and private message topic tracking state (#16474)
This commit fixes two issues at play. The first was introduced
in f6c852b (or maybe not introduced
but rather revealed). When a user posted a new message in a topic,
they received the unread topic tracking state MessageBus message,
and the Unread (X) indicator was incremented by one, because with the
aforementioned perf commit we "guess" the correct last read post
for the user, because we no longer calculate individual users' read
status there. This meant that every time a user posted in a topic
they tracked, the unread indicator was incremented. To get around
this, we can just exclude the user who created the post from the
target users of the unread state message.

The second issue was related to the private message topic tracking
state, and was somewhat similar. Whenever a user created a new private
message, the New (X) indicator was incremented, and could not be
cleared until the page was refreshed. To solve this, we just don't
update the topic state for the user when the new_topic tracking state
message comes through if the user who created the topic is the
same as the current user.

cf. https://meta.discourse.org/t/bottom-of-topic-shows-there-is-1-unread-remaining-when-there-are-actually-0-unread-topics-remaining/220817
2022-04-19 11:37:01 +10:00
..
fabricators FIX: Issues with incorrect unread and private message topic tracking state (#16474) 2022-04-19 11:37:01 +10:00
fixtures FIX: Support new layout on Amazon product pages (#16091) 2022-03-04 18:31:53 -05:00
helpers FIX: include crawler content on old mobile browsers (#16387) 2022-04-06 11:09:12 +01:00
import_export DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
initializers DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
integration FEATURE: Allow multiple required tag groups for a category (#16381) 2022-04-06 14:08:06 +01:00
integrity DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
jobs DEV: Accept force_respect_seen_recently argument in UserEmail job (#16460) 2022-04-18 13:32:11 -05:00
lib FIX: Issues with incorrect unread and private message topic tracking state (#16474) 2022-04-19 11:37:01 +10:00
mailers REFACTOR: Add full_url to Group 2022-04-14 11:53:57 +02:00
models FIX: Issues with incorrect unread and private message topic tracking state (#16474) 2022-04-19 11:37:01 +10:00
multisite DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
requests FIX: Do not show visibility topic if visible (#16478) 2022-04-18 11:16:30 +03:00
script/import_scripts DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
serializers FEATURE: add user_suspended attribute in post serialize. (#16413) 2022-04-13 19:58:09 +05:30
services FEATURE: Improve screened IPs roll up and extend for IPv6 (#15585) 2022-04-12 21:07:37 +03:00
support FEATURE: Add 2FA support to the Discourse Connect Provider protocol (#16386) 2022-04-13 15:04:09 +03:00
tasks DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
views FEATURE: add nofollow to RSS alternate link in topics and categories (#16013) 2022-03-09 16:34:02 +11:00
rails_helper.rb PERF: perform all cached counting in background (#15991) 2022-02-22 16:45:25 +00:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00