FIX: Don't update `posts_read_count` when the post is from a PM. (PR #12131)

We don’t want TL0 users doing the discobot tutorial to increase their read count.

GitHub

:golfing_man::golf:

    return if Topic.find_by(id: args[:topic_id], archetype: Archetype.private_message)

(I don’t think it’s much better so I’m not even marking it as a suggestion :grinning_face_with_smiling_eyes:)

I ended up using exists? instead:

Topic.exists?(id: args[:topic_id], archetype: Archetype.private_message)

Thanks for the suggestion. :grinning_face_with_smiling_eyes:

1 Like