Skip to content
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

Add missing mod log entries for federated actions #2198

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Apr 7, 2022

No description provided.

@Nutomic Nutomic requested a review from dessalines as a code owner April 7, 2022 11:37
blocking(context.pool(), move |conn| {
ModBanFromCommunity::create(conn, &form)
})
.await??;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was accidentally writing to the mod log for site bans, not community bans.

community_id: community.id,
removed: Some(false),
reason: None,
expires: None,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this have an expires field? Doesnt seem to make any sense.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea was similar to person, to allow for temp bans. Obvi we haven't implemented that yet tho. Pry fine to leave it for now, and then eventually add it if ppl ask for it. It'd be very similar to the commits for person, IE adding a ban_expires column.

@Nutomic
Copy link
Member Author

Nutomic commented Apr 7, 2022

@dessalines Could you also look through all the receive() methods in crates/apub/src/activities, to see if i missed something, or implemented something wrong?

@@ -161,6 +161,8 @@ impl ApubObject for ApubPost {
.await?;
let community = page.extract_community(context, request_counter).await?;

// TODO: write mod log if stickied or locked changed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dessalines dessalines merged commit f9d563d into main Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants