mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 15:35:12 +00:00
rename fetchHostMeta to fetchWebFingerTemplateFromHostMeta
This commit is contained in:
parent
d81aadfe23
commit
1fa92ad763
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ export class WebfingerService {
|
||||||
@bindThis
|
@bindThis
|
||||||
public async webfinger(query: string): Promise<IWebFinger> {
|
public async webfinger(query: string): Promise<IWebFinger> {
|
||||||
const hostMetaUrl = this.queryToHostMetaUrl(query);
|
const hostMetaUrl = this.queryToHostMetaUrl(query);
|
||||||
const template = await this.fetchHostMeta(hostMetaUrl) ?? this.queryToWebFingerTemplate(query);
|
const template = await this.fetchWebFingerTemplateFromHostMeta(hostMetaUrl) ?? this.queryToWebFingerTemplate(query);
|
||||||
const url = this.genUrl(query, template);
|
const url = this.genUrl(query, template);
|
||||||
|
|
||||||
return await this.httpRequestService.getJson<IWebFinger>(url, 'application/jrd+json, application/json');
|
return await this.httpRequestService.getJson<IWebFinger>(url, 'application/jrd+json, application/json');
|
||||||
|
@ -89,7 +89,7 @@ export class WebfingerService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
private async fetchHostMeta(url: string): Promise<string | null> {
|
private async fetchWebFingerTemplateFromHostMeta(url: string): Promise<string | null> {
|
||||||
try {
|
try {
|
||||||
const res = await this.httpRequestService.getHtml(url, 'application/xrd+xml');
|
const res = await this.httpRequestService.getHtml(url, 'application/xrd+xml');
|
||||||
const options = {
|
const options = {
|
||||||
|
|
Loading…
Reference in a new issue