updateTypingStatus method

void updateTypingStatus(
  1. Member? member,
  2. {bool typing = false}
)

Implementation

void updateTypingStatus(Member? member, {bool typing = false}) {
  if (member == null) return;

  final typingStatus = TypingStatus(
    channelType: channelType,
    channelUrl: channelUrl,
    user: member,
    timestamp: DateTime.now().millisecondsSinceEpoch,
  );
  if (typing) {
    typingStatus.saveToCache(chat);
  } else {
    typingStatus.removeFromCache(chat);
  }
}