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

Testing for federation with NodeBB, make community.followers_url optional #4629

Merged
merged 2 commits into from
Apr 29, 2024

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Apr 15, 2024

NodeBB doesnt have the followers field for community. This field is also not mandatory in the Activitypub standard, so we need to drop the requirement in Lemmy as well.

See https://community.nodebb.org/category/30/activitypub

.await
.ok();
if let Some(followers) = group.followers {
followers.dereference(&community_, &context_).await.ok();
Copy link
Member

Choose a reason for hiding this comment

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

I'm not familiar with the dereference function and I couldn't find docs for it. I figure it's related to the dereference operator *?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably from a trait in the activitypub_federation crate

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -49,8 +49,8 @@ pub struct Community {
/// A URL for a banner.
pub banner: Option<DbUrl>,
#[cfg_attr(feature = "full", ts(skip))]
#[serde(skip, default = "placeholder_apub_url")]
pub followers_url: DbUrl,
#[serde(skip)]
Copy link
Member

Choose a reason for hiding this comment

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

No breaking change since its skipped anyway.

@Nutomic Nutomic merged commit beec080 into main Apr 29, 2024
2 checks passed
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.

None yet

4 participants