Special error for catching activitypub serialization issues
This commit is contained in:
parent
2f0b91d843
commit
648e7a7581
2 changed files with 14 additions and 4 deletions
|
@ -282,7 +282,11 @@ def handle_unfavorite(activity):
|
|||
@app.task
|
||||
def handle_boost(activity):
|
||||
''' someone gave us a boost! '''
|
||||
boost = activitypub.Boost(**activity).to_model(models.Boost)
|
||||
try:
|
||||
boost = activitypub.Boost(**activity).to_model(models.Boost)
|
||||
except activitypub.ActivitySerializerError:
|
||||
# this probably just means we tried to boost an unknown status
|
||||
return
|
||||
|
||||
if not boost.user.local:
|
||||
status_builder.create_notification(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue