toModel method

MuteDuration toModel()

Constructs a new MuteDuration from this ChatEventsVersionedMixin$Events$EventChatMuted$Duration.

Implementation

MuteDuration toModel() {
  if ($$typename == 'MuteForeverDuration') {
    return MuteDuration.forever();
  }

  return MuteDuration.until(
    (this
            as ChatEventsVersionedMixin$Events$EventChatMuted$Duration$MuteUntilDuration)
        .until,
  );
}