user property

RxUser? get user

Returns RxUser being recipient of this chat.

Only meaningful, if the chat is a dialog.

Implementation

RxUser? get user =>
    chat?.chat.value.isDialog == true
        ? chat?.members.values.firstWhereOrNull((e) => e.user.id != me)?.user
        : null;