fix list creation in pleroma
This commit is contained in:
parent
d74b030688
commit
af026a444d
|
@ -357,7 +357,11 @@ export class MastodonService {
|
|||
createList(account: AccountInfo, title: string): Promise<StreamElement> {
|
||||
let route = `https://${account.instance}${this.apiRoutes.postList}?title=${title}`;
|
||||
const headers = new HttpHeaders({ 'Authorization': `Bearer ${account.token.access_token}` });
|
||||
return this.httpClient.post<List>(route, null, { headers: headers }).toPromise()
|
||||
|
||||
let data = new ListData();
|
||||
data.title = title;
|
||||
|
||||
return this.httpClient.post<List>(route, data, { headers: headers }).toPromise()
|
||||
.then((list: List) => {
|
||||
return new StreamElement(StreamTypeEnum.list, list.title, account.id, null, list.title, list.id, account.instance);
|
||||
});
|
||||
|
@ -543,6 +547,11 @@ class PollData {
|
|||
choices: number[];
|
||||
}
|
||||
|
||||
class ListData {
|
||||
title: string;
|
||||
replies_policy: string = 'list'; //TODO
|
||||
}
|
||||
|
||||
class StatusData {
|
||||
status: string;
|
||||
in_reply_to_id: string;
|
||||
|
|
Loading…
Reference in New Issue