fix 3.0.0rc1 hastags

This commit is contained in:
Nicolas Constant 2019-09-25 18:33:13 -04:00
parent 46383c5fda
commit 24177f50b2
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 10 additions and 0 deletions

View File

@ -136,6 +136,16 @@ export class MastodonService {
const route = `https://${account.instance}${searchRoute}?q=${query}&resolve=${resolve}`;
const headers = new HttpHeaders({ 'Authorization': `Bearer ${account.token.access_token}` });
return this.httpClient.get<Results>(route, { headers: headers }).toPromise()
.then((result: Results) => {
if(version === 'v2'){
result = {
accounts: result.accounts,
statuses: result.statuses,
hashtags: result.hashtags.map(x => (<any>x).name)
}
}
return result;
});
}
getAccountStatuses(account: AccountInfo, targetAccountId: number, onlyMedia: boolean, onlyPinned: boolean, excludeReplies: boolean, maxId: string, sinceId: string, limit: number = 20): Promise<Status[]> {