UserTotalUnreadMessageCountGetRequest constructor

UserTotalUnreadMessageCountGetRequest({
  1. GroupChannelTotalUnreadMessageCountParams? params,
  2. String? userId,
})

Implementation

UserTotalUnreadMessageCountGetRequest({
  GroupChannelTotalUnreadMessageCountParams? params,
  String? userId,
}) : super(userId: userId) {
  url = 'users/${userId ?? state.userId}/unread_message_count';
  final customTypes = params?.customTypes ?? [];
  final superFilter = params?.superChannelFilter ?? SuperChannelFilter.all;
  queryParams = {
    if (customTypes.isNotEmpty) 'custom_types': customTypes,
    'super_mode': groupChannelSuperFilterEnum(superFilter),
  };
}