copyWith method

DeleteMessages copyWith({
  1. int? chatId,
  2. List<int>? messageIds,
  3. bool? revoke,
})

Copy model with modified properties.

Properties:

  • chat_id: Chat identifier
  • message_ids: Identifiers of the messages to be deleted. Use messageProperties.can_be_deleted_only_for_self and messageProperties.can_be_deleted_for_all_users to get suitable messages
  • revoke: Pass true to delete messages for all chat members. Always true for supergroups, channels and secret chats

Implementation

DeleteMessages copyWith({
  int? chatId,
  List<int>? messageIds,
  bool? revoke,
}) =>
    DeleteMessages(
      chatId: chatId ?? this.chatId,
      messageIds: messageIds ?? this.messageIds,
      revoke: revoke ?? this.revoke,
    );