Skip to content

Commit

Permalink
Return default value from member when id is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
James Graham committed Nov 5, 2023
1 parent 2807436 commit 63d8fca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Quotient/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ User* Room::user(const QString& userId) const
RoomMember Room::member(const QString& userId) const
{
if (userId.isEmpty()) {
return RoomMember(this);
return {};
}
return RoomMember(this, currentState().get<RoomMemberEvent>(userId));
}
Expand Down

0 comments on commit 63d8fca

Please sign in to comment.