

@classmethod
@gen.coroutine
def _CreateViewpointURL(cls, client, recipient_user, identity_key, viewpoint, use_short_domain=False):
    'Creates a Short URL which links to a conversation on the website.\n\n    If "use_short_domain" is true, then return a URL that uses the short domain, along with\n    a shorter group_id prefix that will get re-mapped by ShortDomainRedirectHandler.\n    '
    short_url = (yield Identity.CreateInvitationURL(client, recipient_user.user_id, identity_key, viewpoint.viewpoint_id, default_url=('/view#conv/%s' % viewpoint.viewpoint_id)))
    if use_short_domain:
        assert short_url.group_id.startswith('pr/'), short_url
        raise gen.Return(('https://%s/p%s%s' % (options.options.short_domain, short_url.group_id[3:], short_url.random_key)))
    raise gen.Return(('https://%s/%s%s' % (options.options.domain, short_url.group_id, short_url.random_key)))

dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/alert_manager.py AlertManager._CreateViewpointURL/original