# Privéberichten hoe zet ik ze in de inbox vanuit verzonden wanneer geïmporteerd uit vanilla

**URL:** https://meta.discourse.org/t/private-messages-how-to-put-to-inbox-from-sent-when-imported-from-vanilla/177332
**Category:** Support
**Created:** [26 januari 2021 om 16:13 UTC](https://meta.discourse.org/t/private-messages-how-to-put-to-inbox-from-sent-when-imported-from-vanilla/177332 "2021-01-26T16:13:41Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Ghan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ghan/32/177964_2.png) [@Ghan](https://meta.discourse.org/u/Ghan)
#### Post date: [26 januari 2021 om 16:23 UTC](https://meta.discourse.org/t/private-messages-how-to-put-to-inbox-from-sent-when-imported-from-vanilla/177332/2 "2021-01-26T16:23:13Z")

</div>

Typically, the Inbox will only contain private messages where either:

1. You received the private message sent by someone else.
2. Someone has replied to a private message that you sent.

I’ve noticed with importing from other boards that private messages in category #2 don’t appear to show properly in the Inbox, even when the topic does have replies. This appears to be due to a condition on the query for the Inbox that pertains to the participant\_count field of the topic. The importer doesn’t properly update this field, so it is set to `1` by default. When the participant\_count is 1, the query will not return that topic for display in the Inbox view.

To fix this, you’ll need to either adjust the importer to include a count of participants in the private message, or update the participant count after the import, which can be accomplished by running this on the rails console:

`Topic.private_messages.map(&:update_statistics)`

More here:

> [@Imported private discussion doesn't appear in the author inbox](https://meta.discourse.org/t/imported-private-discussion-doesnt-appear-in-the-author-inbox/163252):
>
> Hi, I’m trying to import private messages from a vBulletin5 database. It works, but in the author profile the discussion only appears in “sent”, not in “inbox”. On the other participant profile, the discussion correctly appears in “inbox” as well as in “sent”. Author profile: Appears in “sent” But not in “inbox” Other participant profile: Appears in both: How can I make the discussion appears in the inbox of the author? My current messy code if ne…

---

_[View the full topic](https://meta.discourse.org/t/private-messages-how-to-put-to-inbox-from-sent-when-imported-from-vanilla/177332)._
