muteAuthorToQueue method

Future<int> muteAuthorToQueue(
  1. ModeratorEntry target
)

Implementation

Future<int> muteAuthorToQueue(ModeratorEntry target) async {
  //if (m.flags.moderate) return false;
  if (_mutedAuthors.contains(target.keyHint)) return -1;
  _mutedAuthors.add(target.author);

  await _disk?.commitMutesPreferences(_mutedAuthors.toList());
  _dirty = true;
  final om = _ogMessages.addMute(target.shortLink, now);
  if (om == null) return -1;
  return om.timestamp;
}