"Sorry, you have no access to that topic!" after mod converts a topic into a personal message

I was able to reproduce this once by doing the following:

  1. Topic was created by an admin 4 days ago
  2. TL0 user replied and needed approval.
  3. Post was approved by moderator.
  4. When reply was 2 minutes old, the moderator made the topic a PM.
  5. Moderator was invited and given access to the topic.

It seems like this may partially be related to the editing grace period expiring or the approval of the post.

Thanks @simon for assisting me in repro’ing this.

That being said, the behavior here feels really inconsistent and unexpected to me.

If a topic has one post by one user, mod is given access to PM when converted.

If a topic has two posts by one or more users, mod is not given access (except for the possible bug case above).

Would it make more sense if a topic is made a PM by a mod to automatically give them access as they’re probably doing this for a reason?