Search for username in compose mode
This commit is contained in:
@@ -770,6 +770,7 @@ export type WebAPIType = {
|
||||
userLanguages: ReadonlyArray<string>;
|
||||
}
|
||||
) => Promise<ProfileType>;
|
||||
getProfileForUsername: (username: string) => Promise<ProfileType>;
|
||||
getProfileUnauth: (
|
||||
identifier: string,
|
||||
options: {
|
||||
@@ -1077,6 +1078,7 @@ export function initialize({
|
||||
getKeysForIdentifierUnauth,
|
||||
getMyKeys,
|
||||
getProfile,
|
||||
getProfileForUsername,
|
||||
getProfileUnauth,
|
||||
getBadgeImageFile,
|
||||
getProvisioningResource,
|
||||
@@ -1385,6 +1387,12 @@ export function initialize({
|
||||
})) as ProfileType;
|
||||
}
|
||||
|
||||
async function getProfileForUsername(usernameToFetch: string) {
|
||||
return getProfile(`username/${usernameToFetch}`, {
|
||||
userLanguages: [],
|
||||
});
|
||||
}
|
||||
|
||||
async function putProfile(
|
||||
jsonData: ProfileRequestDataType
|
||||
): Promise<UploadAvatarHeadersType | undefined> {
|
||||
|
Reference in New Issue
Block a user