receipts property

List<Receipt> get receipts

Returns a list of Receipt instances for this event.

Implementation

List<Receipt> get receipts {
  final room = this.room;
  final receipts = room.receiptState;
  final receiptsList = receipts.global.otherUsers.entries
      .where((entry) => entry.value.eventId == eventId)
      .map((entry) => Receipt(
          room.unsafeGetUserFromMemoryOrFallback(entry.key),
          entry.value.timestamp))
      .toList();

  final own = receipts.global.latestOwnReceipt;
  if (own != null) {
    receiptsList.add(Receipt(
        room.unsafeGetUserFromMemoryOrFallback(room.client.userID!),
        own.timestamp));
  }

  return receiptsList;
}