sendToFollowers static method

Future<LCStatus> sendToFollowers(
  1. LCStatus status
)

Send a status to current signined user's followers.

Implementation

static Future<LCStatus> sendToFollowers(LCStatus status) async {
  LCUser? user = await LCUser.getCurrent();
  if (user == null) {
    throw ArgumentError.notNull('current user');
  }

  status.data[SourceKey] = user;

  LCQuery<LCObject> query = new LCQuery('_Follower');
  query.whereEqualTo('user', user);
  query.select('follower');
  status.query = query;

  status.inboxType = InboxTypeDefault;

  return await status.send();
}