Fixes ignore test for valid remote statuses
This commit is contained in:
parent
81bd3f5be8
commit
28dc67bf5c
2 changed files with 10 additions and 3 deletions
|
@ -123,12 +123,14 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
|
|||
""" keep notes if they are replies to existing statuses """
|
||||
if activity.type == "Announce":
|
||||
try:
|
||||
boosted = activitypub.resolve_remote_id(activity.object, save=False)
|
||||
boosted = activitypub.resolve_remote_id(
|
||||
activity.object, get_activity=True
|
||||
)
|
||||
except activitypub.ActivitySerializerError:
|
||||
# if we can't load the status, definitely ignore it
|
||||
return True
|
||||
# keep the boost if we would keep the status
|
||||
return cls.ignore_activity(boosted.to_activity_dataclass())
|
||||
return cls.ignore_activity(boosted)
|
||||
|
||||
# keep if it if it's a custom type
|
||||
if activity.type != "Note":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue