From aa10cf45a5876880474ba82a07096732d5f1d45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sun, 26 Sep 2021 15:05:51 +0200 Subject: [PATCH] Convert KeyVerificationStateObserver to TS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- ...cationStateObserver.js => KeyVerificationStateObserver.ts} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename src/utils/{KeyVerificationStateObserver.js => KeyVerificationStateObserver.ts} (86%) diff --git a/src/utils/KeyVerificationStateObserver.js b/src/utils/KeyVerificationStateObserver.ts similarity index 86% rename from src/utils/KeyVerificationStateObserver.js rename to src/utils/KeyVerificationStateObserver.ts index 023cdf3a75..e4fae3f3c8 100644 --- a/src/utils/KeyVerificationStateObserver.js +++ b/src/utils/KeyVerificationStateObserver.ts @@ -17,14 +17,14 @@ limitations under the License. import { MatrixClientPeg } from '../MatrixClientPeg'; import { _t } from '../languageHandler'; -export function getNameForEventRoom(userId, roomId) { +export function getNameForEventRoom(userId: string, roomId: string): string { const client = MatrixClientPeg.get(); const room = client.getRoom(roomId); const member = room && room.getMember(userId); return member ? member.name : userId; } -export function userLabelForEventRoom(userId, roomId) { +export function userLabelForEventRoom(userId: string, roomId: string): string { const name = getNameForEventRoom(userId, roomId); if (name !== userId) { return _t("%(name)s (%(userId)s)", { name, userId });