FIX: fix notifications for flag PMs and show topics with moderator posts in inbox (#7331)

Some old moderator posts that were not correctly processed before this change and 993d8f34 are not listed under /u/username/messages
This commit is contained in:
Maja Komel
2019-04-25 11:15:13 +02:00
committed by Régis Hanol
parent 996e5e5dfa
commit 422237391e
3 changed files with 23 additions and 7 deletions

View File

@@ -1070,4 +1070,16 @@ describe TopicQuery do
end
end
end
describe '#list_private_messages' do
it "includes topics with moderator posts" do
private_message_topic = Fabricate(:private_message_post, user: user).topic
expect(TopicQuery.new(user).list_private_messages(user).topics).to be_empty
private_message_topic.add_moderator_post(admin, "Thank you for your flag")
expect(TopicQuery.new(user).list_private_messages(user).topics).to eq([private_message_topic])
end
end
end