-
-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement private communities #5076
Conversation
fa6d326
to
3d416dd
Compare
8fa2cee
to
1a8d103
Compare
fe83b43
to
ad532f5
Compare
ad532f5
to
68d4ca9
Compare
8c3f0c6
to
61a1e9b
Compare
61a1e9b
to
9e12028
Compare
Found the problem, the ci check for check_diesel_schema was not working correctly and it actually changed schema.rs while running migrations. The thing is with the extra foreign key reference, community_follower isnt joinable to person anymore, so the on clause has to be specified explicity every time. |
crates/api_common/src/community.rs
Outdated
#[derive(Debug, Serialize, Deserialize, Clone)] | ||
#[cfg_attr(feature = "full", derive(TS))] | ||
#[cfg_attr(feature = "full", ts(export))] | ||
pub struct ListCommunityPendingFollows { | ||
/// Only shows the unapproved applications | ||
pub pending_only: Option<bool>, | ||
// Only for admins, show pending follows for communities which you dont moderate | ||
pub all_communities: Option<bool>, | ||
pub page: Option<i64>, | ||
pub limit: Option<i64>, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably have a skip_serializing_none
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besidel @SleeplessOne1917 's comment everything looks good. I updated from main in case that was one of the test failures.
I fixed one test failure, but now it keeps throwing this error which I cant reproduce locally, and seems completely unrelated. |
cf49e2d
to
3668da8
Compare
9c5a3fd
to
a77edc8
Compare
b7cc812
to
c7705cd
Compare
See https://github.com/LemmyNet/rfcs/blob/main/0005-private-communities.md
CommunityVisibility::Private
CommunityFollower.pending
(bool) toCommunityFollower.state
(Accepted/Pending,ApprovalRequired)GET /community/pending_follows/count
,GET /community/pending_follows/list
,POST /community/pending_follows/approve
is_new_instance
for/api/v3/community/pending_follows/list
itemsHide private content in RSS feeds(not necessary, already handled via post_view.rs