toggleMessageSenderIsBlocked method

Future<Map> toggleMessageSenderIsBlocked({
  1. required int user_id,
  2. bool is_blocked = false,
  3. required int clientId,
  4. bool isVoid = false,
  5. String? extra,
  6. bool? isUseCache,
  7. Duration? durationCacheExpire,
})

toggle message sender is block

Implementation

Future<Map> toggleMessageSenderIsBlocked({
  required int user_id,
  bool is_blocked = false,
  required int clientId,
  bool isVoid = false,
  String? extra,
  bool? isUseCache,
  Duration? durationCacheExpire,
}) async {
  return await request(
    "toggleMessageSenderIsBlocked",
    parameters: {
      "sender_id": {
        "@type": "messageSenderUser",
        "user_id": user_id,
      },
      "is_blocked": is_blocked,
    },
    isUseCache: isUseCache,
    durationCacheExpire: durationCacheExpire,
    clientId: clientId,
    isVoid: isVoid,
    extra: extra,
  );
}