isChannelPost property

bool get isChannelPost

Checks if the current update is from a channel.

Returns true if the chat type is channel, false otherwise. The result is cached after the first access for better performance.

Implementation

bool get isChannelPost {
  if (!_isChannelPostCached) {
    _cachedIsChannelPost = chat?.type == ChatType.channel;
    _isChannelPostCached = true;
  }
  return _cachedIsChannelPost ?? false;
}