macOS Messages app: how can I undo the deletion of a conversation?

I deleted a conversation by mistake. Restoring ~/Library/Messages from Time Machine doesn’t undo the deletion. Something else must have to be restored. What?

I'm on macOS 10.15.5


  1. In the Messages app Preferences, sign out.
  2. Quit Messages.
  3. From Time Machine
    • restore ~/Library/Messages/
    • restore ~/Library/Containers/com.apple.iChat/Data/Library/Messages/
  4. Log out.

This worked. I summarized here from received wisdom.