mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
* Revert "Revert "FEATURE: Publish read state on group messages. (#7989) [Undo revert] (#8024)"" This reverts commit 36425eb9f04cfac7201632d648050cb43a035bc1. * Fix: Show who read only if the attribute is enabled * PERF: Precalculate the last post readed by a group member * Use book-reader icon instear of far-eye * FIX: update topic groups correctly * DEV: Tidy up read indicator update on write
This commit is contained in:
@ -1020,6 +1020,24 @@ describe TopicQuery do
|
||||
|
||||
expect(topics).to eq([])
|
||||
end
|
||||
|
||||
context "Calculating minimum unread count for a topic" do
|
||||
before { group.update!(publish_read_state: true) }
|
||||
|
||||
let(:listed_message) do
|
||||
TopicQuery.new(nil, group_name: group.name)
|
||||
.list_private_messages_group(creator)
|
||||
.topics.first
|
||||
end
|
||||
|
||||
it 'returns the last read post number' do
|
||||
topic_group = TopicGroup.create!(
|
||||
topic: group_message, group: group, last_read_post_number: 10
|
||||
)
|
||||
|
||||
expect(listed_message.last_read_post_number).to eq(topic_group.last_read_post_number)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "shared drafts" do
|
||||
|
Reference in New Issue
Block a user