cli: fix crash when viewing message from pending contact.

Fixes #114.