get sortedMessages(): Array<MessageModel> {
    return Array.from(this.messages.values()).sort((a, b) => a.timestamp - b.timestamp);
  }