Store user that added link
This commit is contained in:
@ -15,6 +15,12 @@ class Link(ActivitypubMixin, BookWyrmModel):
|
||||
"""a link to a website"""
|
||||
|
||||
url = fields.URLField(max_length=255, activitypub_field="href")
|
||||
added_by = fields.ForeignKey(
|
||||
"User",
|
||||
on_delete=models.SET_NULL,
|
||||
null=True,
|
||||
activitypub_field="attributedTo"
|
||||
)
|
||||
domain = models.ForeignKey(
|
||||
"LinkDomain",
|
||||
on_delete=models.CASCADE,
|
||||
@ -22,9 +28,6 @@ class Link(ActivitypubMixin, BookWyrmModel):
|
||||
blank=True,
|
||||
related_name="links",
|
||||
)
|
||||
added_by = fields.ForeignKey(
|
||||
"User", on_delete=models.SET_NULL, null=True, activitypub_field="attributedTo"
|
||||
)
|
||||
|
||||
activity_serializer = activitypub.Link
|
||||
reverse_unfurl = True
|
||||
|
Reference in New Issue
Block a user