Update Inbox, fix undo announce

This commit is contained in:
Daniel Supernault 2022-02-12 23:01:50 -07:00
parent f21b12d2d5
commit cf286fb046
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -114,6 +114,10 @@ class Inbox
$this->handleStoryReplyActivity();
break;
// case 'Update':
// (new UpdateActivity($this->payload, $this->profile))->handle();
// break;
default:
// TODO: decide how to handle invalid verbs.
break;
@ -688,11 +692,13 @@ class Inbox
break;
case 'Announce':
if(is_array($obj) && isset($obj['object'])) {
$obj = $obj['object'];
if(!Helpers::validateLocalUrl($obj)) {
}
if(!is_string($obj) || !Helpers::validateLocalUrl($obj)) {
return;
}
$status = Helpers::statusFetch($obj);
$status = Status::whereUri($obj)->exists();
if(!$status) {
return;
}