asAnnouncementsQuery method

AnnouncementsQuery? asAnnouncementsQuery()

Implementation

AnnouncementsQuery? asAnnouncementsQuery() {
  switch (this.ids.type) {
    case CommunitiesEntityType.topic:
      return AnnouncementsQuery.inTopic(this.ids.ids.first);
    case CommunitiesEntityType.group:
      return AnnouncementsQuery.inGroup(this.ids.ids.first);
    case CommunitiesEntityType.app:
      return AnnouncementsQuery.timeline();
    case CommunitiesEntityType.user:
      return AnnouncementsQuery.forFeedOf(UserId.create(this.ids.ids.first));
  }
  return null;
}