From 0340a3198cd2829d5f7da3634bd8b88e37a46eb0 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Sat, 29 Oct 2022 05:53:56 +1300 Subject: [PATCH] Remove fetch by username endpoint --- html/src/app.js | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index c704bcd7..0853e2f5 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -1666,24 +1666,6 @@ speechSynthesis.getVoices(); }); }; - /* - params: { - username: string - } - */ - API.getUserByUsername = function (params) { - return this.call(`users/${params.username}/name`, { - method: 'GET' - }).then((json) => { - var args = { - json, - params - }; - this.$emit('USER', args); - return args; - }); - }; - /* params: { status: string ('active', 'offline', 'busy', 'ask me', 'join me'), @@ -10827,14 +10809,6 @@ speechSynthesis.getVoices(); return; } } - try { - var username = encodeURIComponent(ref.displayName.toLowerCase()); - var args = await API.getUserByUsername({username}); - if (args.ref.displayName === ref.displayName) { - this.showUserDialog(args.ref.id); - return; - } - } catch (err) {} this.searchText = ref.displayName; await this.searchUser(); for (var ctx of this.searchUserResults) {