Skip to content

Commit

Permalink
fix(federation): Correctly handle database errors
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Feb 29, 2024
1 parent 84f7ad3 commit c84be51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Federation/CloudFederationProviderTalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ private function messagePosted(int $remoteAttendeeId, array $notification): arra
// DBException::REASON_UNIQUE_CONSTRAINT_VIOLATION happens when
// multiple users are in the same conversation. We are therefore
// informed multiple times about the same remote message.
if ($e->getCode() !== DBException::REASON_UNIQUE_CONSTRAINT_VIOLATION) {
if ($e->getReason() !== DBException::REASON_UNIQUE_CONSTRAINT_VIOLATION) {
$this->logger->error('Error saving proxy cache message failed: ' . $e->getMessage(), ['exception' => $e]);
throw $e;
}
Expand Down

0 comments on commit c84be51

Please sign in to comment.