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