Allow exception to be thrown if saveActivityObject fails
This commit is contained in:
parent
c96f0aa30f
commit
ea8cb21e98
@ -183,14 +183,7 @@ class FavoritePlugin extends ActivityHandlerPlugin
|
|||||||
// We must have an objects[0] here because in isMyActivity we require the count to be == 1
|
// We must have an objects[0] here because in isMyActivity we require the count to be == 1
|
||||||
$actobj = $act->objects[0];
|
$actobj = $act->objects[0];
|
||||||
|
|
||||||
try {
|
$object = Fave::saveActivityObject($actobj, $stored);
|
||||||
$object = Fave::saveActivityObject($actobj, $stored);
|
|
||||||
} catch (ServerException $e) {
|
|
||||||
// Probably that the favored notice doesn't exist in our local database
|
|
||||||
// but may also be some missing profile or so, which we could catch in a
|
|
||||||
// more explicit catch-statement.
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return $object;
|
return $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user