setNotificationPref method

void setNotificationPref(
  1. String userId,
  2. String targetKind,
  3. String targetId,
  4. String level, {
  5. DateTime? mutedUntil,
})

Stores the preference of userId for the target targetKind (thread, channel or space) targetId at level (all, mentions or mute), muted until mutedUntil when given (13 3.1). A later call replaces it.

A setup step of the tests: no checks of the target and no notification_pref.updated event; the REST path is putNotificationPref. Throws an ArgumentError for another target kind or level.

Example:

world.setNotificationPref(sam.id, 'channel', general, 'all');

Implementation

void setNotificationPref(
  String userId,
  String targetKind,
  String targetId,
  String level, {
  DateTime? mutedUntil,
}) => _setPref(userId, targetKind, targetId, level, mutedUntil);