chatBskyNotificationPutPreferences function

Future<XRPCResponse<NotificationPutPreferencesOutput>> chatBskyNotificationPutPreferences({
  1. ChatPreference? chat,
  2. ChatPreference? chatRequest,
  3. required ServiceContext $ctx,
  4. String? $service,
  5. Map<String, String>? $headers,
  6. Map<String, String>? $unknown,
})

Set the requesting account's chat notification preferences. Only the provided preferences are updated; omitted preferences are left unchanged.

Implementation

Future<XRPCResponse<NotificationPutPreferencesOutput>>
chatBskyNotificationPutPreferences({
  ChatPreference? chat,
  ChatPreference? chatRequest,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.chatBskyNotificationPutPreferences,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    if (chat != null) 'chat': chat.toJson(),
    if (chatRequest != null) 'chatRequest': chatRequest.toJson(),
  },
  to: const NotificationPutPreferencesOutputConverter().fromJson,
);