Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit a3bf5f7

Browse files
committed
fix automatic DM avatar with functional members
1 parent cd8679c commit a3bf5f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/views/avatars/DecoratedRoomAvatar.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { MatrixClientPeg } from "../../../MatrixClientPeg";
2929
import { _t } from "../../../languageHandler";
3030
import DMRoomMap from "../../../utils/DMRoomMap";
3131
import { IOOBData } from "../../../stores/ThreepidInviteStore";
32+
import { getJoinedNonFunctionalMembers } from "../../../utils/room/getJoinedNonFunctionalMembers";
3233

3334
interface IProps {
3435
room: Room;
@@ -158,7 +159,7 @@ export default class DecoratedRoomAvatar extends React.PureComponent<IProps, ISt
158159

159160
// We look at the DMRoomMap and not the tag here so that we don't exclude DMs in Favourites
160161
const otherUserId = DMRoomMap.shared().getUserIdForRoomId(this.props.room.roomId);
161-
if (otherUserId && this.props.room.getJoinedMemberCount() === 2) {
162+
if (otherUserId && getJoinedNonFunctionalMembers(this.props.room).length === 2) {
162163
// Track presence, if available
163164
if (isPresenceEnabled(this.props.room.client)) {
164165
this.dmUser = MatrixClientPeg.safeGet().getUser(otherUserId);

0 commit comments

Comments
 (0)