דיון פרטי מיובא לא מופיע בתיבת הדואר הנכנס של המחבר

From data explorer, I noticed that the participant_count value is wrong:
image

It’s written 1, but there are two people in the conversation.
If I update the topic’s field participant_count to 2 like this:

Topic.find_by(id: 218613).update(participant_count: 2)

the topic now appears in the author’s inbox:

I didn’t notice this behavior by updating other fields like reply_count for example, so it seems specific to participant_count and maybe other fields.

In my import script, I tried adding this:

p[:participant_count] = target_usernames.count

But it didn’t work, I guess we can’t set this field in the importers’ methods.

So I’m a bit stuck here. I’d like my users to have all their PMs with replies in their inbox, not only those that they didn’t start themselves.

Any idea?