isAbandonedDMRoom property

bool isAbandonedDMRoom

Checks if this is an abandoned DM room where the other participant has left the room. This is false when there are still other users in the room or the room is not marked as a DM room.

Implementation

bool get isAbandonedDMRoom {
  final directChatSDNID = this.directChatSDNID;

  if (directChatSDNID == null) return false;
  final dmPartnerMembership =
      unsafeGetUserFromMemoryOrFallback(directChatSDNID).membership;
  return dmPartnerMembership == Membership.leave &&
      summary.mJoinedMemberCount == 1 &&
      summary.mInvitedMemberCount == 0;
}