chore: commit current workspace changes
This commit is contained in:
@@ -91,9 +91,9 @@ final class IngestUserDiscoveryEventJob implements ShouldQueue
|
||||
];
|
||||
|
||||
if (Schema::hasColumn('user_discovery_events', 'meta')) {
|
||||
$insertPayload['meta'] = $this->meta;
|
||||
$insertPayload['meta'] = $this->encodeMetaPayload();
|
||||
} elseif (Schema::hasColumn('user_discovery_events', 'metadata')) {
|
||||
$insertPayload['metadata'] = json_encode($this->meta, JSON_UNESCAPED_SLASHES);
|
||||
$insertPayload['metadata'] = $this->encodeMetaPayload();
|
||||
}
|
||||
|
||||
DB::table('user_discovery_events')->insertOrIgnore($insertPayload);
|
||||
@@ -129,4 +129,12 @@ final class IngestUserDiscoveryEventJob implements ShouldQueue
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
private function encodeMetaPayload(): string
|
||||
{
|
||||
return (string) json_encode(
|
||||
$this->meta,
|
||||
JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_INVALID_UTF8_SUBSTITUTE | JSON_THROW_ON_ERROR
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user