Remove fetch by username endpoint

This commit is contained in:
Natsumi
2022-10-29 05:53:56 +13:00
parent 3595dfd86d
commit 0340a3198c

View File

@@ -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: { params: {
status: string ('active', 'offline', 'busy', 'ask me', 'join me'), status: string ('active', 'offline', 'busy', 'ask me', 'join me'),
@@ -10827,14 +10809,6 @@ speechSynthesis.getVoices();
return; 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; this.searchText = ref.displayName;
await this.searchUser(); await this.searchUser();
for (var ctx of this.searchUserResults) { for (var ctx of this.searchUserResults) {