isServiceMessage method
Determine whether the update is a service message
Implementation
bool isServiceMessage() {
if (msg == null) return false;
final checks = [
msg!.leftChatMember,
msg!.newChatTitle,
msg!.newChatPhoto,
msg!.deleteChatPhoto == true,
msg!.groupChatCreated == true,
msg!.supergroupChatCreated == true,
msg!.channelChatCreated == true,
msg!.messageAutoDeleteTimerChanged,
msg!.successfulPayment,
msg!.refundedPayment,
msg!.usersShared,
msg!.chatShared,
msg!.writeAccessAllowed,
msg!.proximityAlertTriggered,
msg!.boostAdded,
msg!.chatBackgroundSet,
msg!.forumTopicCreated,
msg!.forumTopicEdited,
msg!.forumTopicClosed,
msg!.forumTopicReopened,
msg!.generalForumTopicHidden,
msg!.generalForumTopicUnhidden,
msg!.giveawayCreated,
msg!.giveawayCompleted,
msg!.videoChatScheduled,
msg!.videoChatStarted,
msg!.videoChatEnded,
msg!.videoChatParticipantsInvited,
msg!.webAppData,
msg!.checklistTasksAdded,
msg!.checklistTasksDone,
msg!.directMessagePriceChanged,
msg!.suggestedPostApproved,
msg!.suggestedPostDeclined,
msg!.suggestedPostApprovalFailed,
msg!.suggestedPostPaid,
msg!.suggestedPostRefunded,
msg!.gift,
msg!.uniqueGift,
msg!.giftUpgradeSent,
];
return checks.any((c) => c != null && c != false);
}