@classmethod
  @gen.coroutine
  def _FormatShareNewText(cls, client, viewpoint, activity):
    """Constructs the alert text for a "share_new" operation, similar to this:
         Andy started a conversation: "And Then There Was Brick"
         Andy shared 5 photos
    """
    sharer_name = yield AlertManager._GetNameFromUserId(client, activity.user_id)
    episode_dates, num_shares = AlertManager._GetShareInfo(activity)
    viewpoint_title = AlertManager._GetViewpointTitle(viewpoint)
    if viewpoint_title:
      raise gen.Return('%s started a conversation%s' % (sharer_name,
                                                        viewpoint_title))
    elif num_shares > 0:
      raise gen.Return('%s shared %d photo%s' % (sharer_name,
                                                 num_shares,
                                                 util.Pluralize(num_shares)))
    else:
      raise gen.Return('%s added you to a conversation' % sharer_name)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/alert_manager.py/AlertManager._FormatShareNewText/original