Add follow pending.

This commit is contained in:
Dessalines 2022-05-07 18:54:16 -04:00
parent af760304d8
commit 775ec8861d
3 changed files with 10 additions and 1 deletions

View file

@ -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);
}

View file

@ -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]].

View file

@ -191,6 +191,7 @@ export interface ModStickyPostView {
export interface CommunityFollowerView {
community: CommunitySafe;
follower: PersonSafe;
pending?: boolean;
}
export interface CommunityBlockView {