setLastTimeTimestamp static method

dynamic setLastTimeTimestamp(
  1. ChatModel? model, [
  2. int? timestamp
])

Implementation

static setLastTimeTimestamp(ChatModel? model, [int? timestamp]) async {
  UserStatusHelper.setMyLastSeenAt();
  if (model == null) return;
  await getFromTable('chat_members').update({
    'latest_seen_at': timestamp ?? DateTime.now().millisecondsSinceEpoch
  }).match({
    'chat_id': model.id,
    'user_id': loggedUsername,
  });
}