Fixes boosted remote statuses coming in as Notes

This commit is contained in:
Mouse Reeve 2021-04-05 18:05:06 -07:00
parent 2e245f84be
commit a39cd670ef
2 changed files with 4 additions and 3 deletions

View file

@ -265,7 +265,8 @@ def resolve_remote_id(
"Could not connect to host for remote_id in: %s" % (remote_id)
)
# determine the model implicitly, if not provided
if not model:
# or if it's a model with subclasses like Status, check again
if not model or hasattr(model.objects, "select_subclasses"):
model = get_model_from_type(data.get("type"))
# check for existing items with shared unique identifiers

View file

@ -608,8 +608,8 @@ class Inbox(TestCase):
"summary": "",
"tag": [],
"sensitive": False,
"@context": "https://www.w3.org/ns/activitystreams"
}
"@context": "https://www.w3.org/ns/activitystreams",
},
)
with patch("bookwyrm.models.status.Status.ignore_activity") as discarder: