

@classmethod
@gen.coroutine
def _FormatPostCommentText(cls, client, viewpoint, activity):
    'Constructs the alert text for a "post_comment" operation, similar to this:\n         Andy: What a great experience\n    '
    args_dict = json.loads(activity.json)
    comment = (yield gen.Task(Comment.Query, client, viewpoint.viewpoint_id, args_dict['comment_id'], None))
    sharer_name = (yield AlertManager._GetNameFromUserId(client, activity.user_id))
    raise gen.Return(('%s: %s' % (sharer_name, comment.message)))

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