From b40f946b85604b3ea57660ee125fc385f5cc421a Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 30 Jun 2021 15:15:08 -0700 Subject: [PATCH] Add JSDoc to new Hero method --- src/matrix/room/members/Heroes.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/matrix/room/members/Heroes.js b/src/matrix/room/members/Heroes.js index 921eed47..29732def 100644 --- a/src/matrix/room/members/Heroes.js +++ b/src/matrix/room/members/Heroes.js @@ -98,6 +98,14 @@ export class Heroes { return null; } + /** + * In DM rooms, we want the room's color to be + * the same as the other user's color. Thus, if the room + * only has one hero, we use their ID, instead + * of the room's, to get the avatar color. + * + * @returns {?string} the ID of the single hero. + */ get roomAvatarColorId() { if (this._members.size === 1) { for (const member of this._members.keys()) {