Update Inbox, only log new activities

pull/2159/head
Daniel Supernault 5 years ago
parent 802dd326ce
commit 8f2457bbc8
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

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

Loading…
Cancel
Save