discourse/spec/fabricators
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
..
allowed_pm_users.rb FEATURE: Allow List for PMs (#10270) 2020-07-20 15:23:49 -06:00
api_key_fabricator.rb FEATURE: Hash API keys in the database (#8438) 2019-12-12 11:45:00 +00:00
associated_group_fabricator.rb FEATURE: Experimental support for group membership via google auth (#14835) 2021-12-09 12:30:27 +00:00
badge_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
bookmark_fabricator.rb FEATURE: Polymorphic bookmarks pt. 1 (CRUD) (#16308) 2022-03-30 12:43:11 +10:00
category_fabricator.rb FIX: Make inline oneboxes work with secured topics in secured contexts (#8895) 2020-02-12 12:11:28 +02:00
category_group_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
color_scheme_color_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
color_scheme_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
dimissed_topic_user.rb FEATURE: New way to dismiss new topics (#11927) 2021-02-04 11:27:34 +11:00
do_not_disturb_fabricator.rb FEATURE: Do not disturb (#11484) 2020-12-18 09:03:51 -06:00
email_change_request_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
email_log_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
email_token_fabricator.rb DEV: Hash tokens stored from email_tokens (#14493) 2021-11-25 09:34:39 +02:00
embeddable_host_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
external_upload_stub_fabricator.rb DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
flag_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
group_fabricator.rb DEV: Add SMTP group ID to EmailLog (#13381) 2021-06-15 11:29:46 +10:00
group_history_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
group_request_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
group_user_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
ignored_user_fabricator.rb DEV: Cleanup ignored user logic (#11107) 2020-11-03 12:38:54 +00:00
incoming_email_fabricator.rb DEV: Correctly tag heredocs (#16061) 2022-02-28 20:50:55 +01:00
incoming_link_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
invite_fabricator.rb FEATURE: send max 200 emails every minute for bulk invites (#7875) 2019-07-19 11:29:12 +05:30
invited_user_fabricator.rb FEATURE: multiple use invite links (#9813) 2020-06-09 20:49:32 +05:30
like_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
muted_user.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
notification_fabricator.rb FEATURE: High priority bookmark reminder notifications (#9290) 2020-04-01 09:09:20 +10:00
optimized_image_fabricator.rb DEV: Fix OptimizedImage specs 2020-07-06 21:51:56 +02:00
permalink_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
post_action_fabricator.rb FIX: correct user serializer user method for extended serializer (#8590) 2019-12-19 09:48:01 -08:00
post_custom_field_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
post_detail_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
post_fabricator.rb DEV: Correctly tag heredocs (#16061) 2022-02-28 20:50:55 +01:00
post_reply_key_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
post_revision_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
published_page_fabricator.rb FEATURE: allows published pages to be public (#10053) 2020-06-17 12:42:20 +02:00
reviewable_claimed_topic_fabricator.rb FEATURE: Claim Reviewables by Topic 2019-05-09 13:40:36 -04:00
reviewable_fabricator.rb FEATURE: Notify responders of post removal (#15049) 2021-11-24 09:28:20 -06:00
reviewable_score_fabricator.rb FEATURE: Notify responders of post removal (#15049) 2021-11-24 09:28:20 -06:00
screened_email_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
screened_ip_address_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
screened_url_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
search_log_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
shared_draft_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
single_sign_on_record_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
skipped_email_log_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
tag_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
tag_group_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
tag_group_permission_fabricator.rb SECURITY: Only show tags to users with permission (#15148) 2021-12-01 10:26:56 +08:00
theme_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
theme_field_fabricator.rb FIX: add theme field errors (#12880) 2021-04-28 15:00:37 -07:00
topic_allowed_group_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
topic_allowed_user_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
topic_embed_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
topic_fabricator.rb FIX: Update user stat counts when post/topic visibility changes. (#15883) 2022-02-11 09:00:58 +08:00
topic_tag_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
topic_timer_fabricator.rb DEV: Use dynamic/static fabricator attrs correctly (#9519) 2020-04-22 20:49:53 +02:00
topic_user_fabricator.rb FIX: Issues with incorrect unread and private message topic tracking state (#16474) 2022-04-19 11:37:01 +10:00
upload_fabricator.rb FEATURE: Use path from existing URL of uploads and optimized images (#13177) 2021-05-27 17:42:25 +02:00
user_action_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
user_api_key_fabricator.rb DEV: Introduce plugin API to contribute user api key scopes 2020-10-19 10:40:55 +01:00
user_avatar_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
user_email_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
user_fabricator.rb FEATURE: Disallow putting urls in the title for TL-0 users (#13947) 2021-08-05 13:38:39 +04:00
user_field_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
user_field_option_fabricator.rb.rb FIX: Validate value of custom dropdown user fields - dropdowns and multiple selects (#13890) 2021-07-30 13:50:47 -04:00
user_option_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
user_profile_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
user_second_factor_fabricator.rb DEV: use #frozen_string_literal: true on all spec 2019-04-30 10:27:42 +10:00
user_security_key_fabricator.rb FEATURE: Webauthn authenticator management with 2FA login (Security Keys) (#8099) 2019-10-01 19:08:41 -07:00
watched_word_fabricator.rb DEV: Use dynamic/static fabricator attrs correctly (#9519) 2020-04-22 20:49:53 +02:00
web_crawler_request_fabricator.rb DEV: Use dynamic/static fabricator attrs correctly (#9519) 2020-04-22 20:49:53 +02:00
web_hook_fabricator.rb FEATURE: adds the user_promoted event to webhooks (#15996) 2022-02-22 10:57:18 +01:00