Fixes bugs in how lists/shelves federate Adds

This commit is contained in:
Mouse Reeve
2021-02-10 19:17:01 -08:00
parent bf941f1507
commit 5f7466e92d
5 changed files with 33 additions and 6 deletions

View File

@ -319,8 +319,19 @@ def handle_add(activity):
#this is janky as heck but I haven't thought of a better solution
try:
activitypub.AddBook(**activity).to_model(models.ShelfBook)
return
except activitypub.ActivitySerializerError:
activitypub.AddBook(**activity).to_model(models.Tag)
pass
try:
activitypub.AddListItem(**activity).to_model(models.ListItem)
return
except activitypub.ActivitySerializerError:
pass
try:
activitypub.AddBook(**activity).to_model(models.UserTag)
return
except activitypub.ActivitySerializerError:
pass
@app.task