def METHOD_NAME(self):
    settings = self.request.registry.settings
    userid = self.request.authenticated_userid
    client = get_discourse_client(settings)
    d_username = client.get_username(userid)
    messages = client.client.private_messages_unread(d_username)
    count = len(messages['topic_list']['topics'])
    link = '%s/users/%s/messages' % (
        client.discourse_public_url, d_username)
    return {link: link, count: count}