@classmethod
  @gen.coroutine
  def NotifyPostComment(cls, client, followers, act_dict, cm_dict):
    """Notifies specified followers that a new comment has been posted to the viewpoint.
    Invalidates this comment and all comments posted in the future by setting the start_key.
    Doing this enables the client to efficiently "stack" comment invalidations by fetching
    all comments beyond the lowest start_key in a single call to query_viewpoints. Creates a
    post_comment activity in the viewpoint.
    """
    from viewfinder.backend.db.comment import Comment

    activity_func = NotificationManager._CreateActivityFunc(act_dict, Activity.CreatePostComment, cm_dict)

    # Construct comment id that will sort before the posted comment and all others with
    # greater timestamps. Only do this if comment will not be in-lined.
    if NotificationManager.MAX_INLINE_COMMENT_LEN > len(cm_dict['message']):
      start_key = Comment.ConstructCommentId(cm_dict['timestamp'], 0, 0)
      invalidate = {'viewpoints': [{'viewpoint_id': cm_dict['viewpoint_id'],
                                    'get_comments': True,
                                    'comment_start_key': start_key}]}
    else:
      invalidate = None

    yield NotificationManager._NotifyFollowers(client,
                                               cm_dict['viewpoint_id'],
                                               followers,
                                               invalidate,
                                               activity_func,
                                               inc_badge=True)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/notification_manager.py/NotificationManager.NotifyPostComment/swapped operands of `>`