1
0
Fork 0
forked from mirror/pixelfed

Update Inbox, only log new activities

This commit is contained in:
Daniel Supernault 2020-04-29 20:28:30 -06:00
parent 802dd326ce
commit 8f2457bbc8
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -41,9 +41,15 @@ class Inbox
{
$this->handleVerb();
(new Activity())->create([
'data' => json_encode($this->payload)
]);
if(!Activity::where('data->id', $this->payload['id'])->exists()){
(new Activity())->create([
'to_id' => $this->profile->id,
'data' => json_encode($this->payload)
]);
}
return;
}
public function handleVerb()