When my users visit the “/posted” page (ex. https://meta.discourse.org/posted ), it doesn’t include topics where posts have been imported from a previous site. This is despite their posts showing up on the “/u/xxx/activity/topics” page.
For my own account though, the “/posted” appears to be working fine with imported content. However, I did merge my imported account with the primary account the discourse instance was created with, so maybe this is the reason?
Is this a bug? If someone can help me understand or at least point me to the backend code on the discourse repo for the /posted filter, I can attempt to figure out the problem myself. As someone relatively new to Ruby and Rails, the file structure of the discourse github is still beyond my full comprehension. I appreciate it!
On my account, I merged my initial discourse admin account with my imported account from the older forum. All the topics I have ever posted in correctly show up on /posted
For everyone else, the account they are using was only imported from the old site. For them, only topics they have posted in after the import show up in /posted. I have confirmed this using a test alt account I have
I assume that imported posts should still matter when it comes to what shows up on /posted, so the behavior is correct for my account but not for all the other users. I’m assuming the merge step is what did it because that assigns all my old posts to a new account AFTER they have been imported
Imported topics appear on the /my/activity/topics page and not on the /posted page for users other than myself.
Imported posts also appear under /my/activity/replies but corresponding topics do not appear on the /posted page for users other than myself.
I have also confirmed through an example topic. The user_id on /t/xxx.json matches the user id on /u/yyy.json but topic xxx does not appear on /posted for user yyy
I can also try running the code you provided but there doesn’t seem to be a reason to think this is an ownership problem as far as I can tell.