Add follow pending.
This commit is contained in:
parent
af760304d8
commit
775ec8861d
3 changed files with 10 additions and 1 deletions
|
@ -28,6 +28,7 @@ import {
|
|||
DeleteCommunity,
|
||||
EditCommunity,
|
||||
FollowCommunity,
|
||||
FollowCommunityResponse,
|
||||
GetCommunity,
|
||||
GetCommunityResponse,
|
||||
ListCommunities,
|
||||
|
@ -247,7 +248,9 @@ export class LemmyHttp {
|
|||
/**
|
||||
* Follow / subscribe to a community.
|
||||
*/
|
||||
async followCommunity(form: FollowCommunity): Promise<CommunityResponse> {
|
||||
async followCommunity(
|
||||
form: FollowCommunity
|
||||
): Promise<FollowCommunityResponse> {
|
||||
return this.wrapper(HttpType.Post, "/community/follow", form);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { Site } from "../source";
|
||||
import {
|
||||
CommunityFollowerView,
|
||||
CommunityModeratorView,
|
||||
CommunityView,
|
||||
PersonViewSafe,
|
||||
|
@ -38,6 +39,10 @@ export interface CommunityResponse {
|
|||
community_view: CommunityView;
|
||||
}
|
||||
|
||||
export interface FollowCommunityResponse {
|
||||
community_follower_view: CommunityFollowerView;
|
||||
}
|
||||
|
||||
export interface ListCommunities {
|
||||
/**
|
||||
* The [[ListingType]].
|
||||
|
|
|
@ -191,6 +191,7 @@ export interface ModStickyPostView {
|
|||
export interface CommunityFollowerView {
|
||||
community: CommunitySafe;
|
||||
follower: PersonSafe;
|
||||
pending?: boolean;
|
||||
}
|
||||
|
||||
export interface CommunityBlockView {
|
||||
|
|
Loading…
Reference in a new issue