(bug 43661) Add link trail and link prefix to API

This is more than just fetching messages -- we also check whether the messages
are enabled via the preferences and configuration. If not, the variables won't
be there.

Change-Id: If617f43004dbd42f7eaa6f75010cdc5a0a662f60