Return false by default

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-04-20 11:01:13 +02:00
parent e049edd449
commit 628dd7bf41
+3
View File
@@ -110,6 +110,7 @@ RoomMember.prototype.setMembershipEvent = function(event, roomState) {
displayName,
roomState,
);
if (this.userId == "@jboi:jboi.nl") console.log("LOG roomMember", this);
const oldName = this.name;
this.name = calculateDisplayName(
@@ -328,6 +329,8 @@ function shouldDisambiguate(selfUserId, displayName, roomState) {
// displayname, after hidden character removal.
const userIds = roomState.getUserIdsWithDisplayName(displayName);
if (userIds.some((u) => u !== selfUserId)) return true;
return false;
}
function calculateDisplayName(selfUserId, displayName, roomState, disambiguate) {