Skip to content

Commit

Permalink
chore: add logs for new client event
Browse files Browse the repository at this point in the history
  • Loading branch information
tmspzz committed Sep 25, 2023
1 parent 38f5d6f commit 03a5f40
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,21 @@ internal class UserEventReceiverImpl internal constructor(

private suspend fun handleNewClient(event: Event.User.NewClient): Either<CoreFailure, Unit> =
clientRepository.saveNewClientEvent(event)
.onSuccess {
kaliumLogger
.logEventProcessing(
EventLoggingStatus.SUCCESS,
event
)
}
.onFailure {
kaliumLogger
.logEventProcessing(
EventLoggingStatus.FAILURE,
event,
Pair("errorInfo", "$it")
)
}

private suspend fun handleUserDelete(event: Event.User.UserDelete): Either<CoreFailure, Unit> =
if (selfUserId == event.userId) {
Expand Down

0 comments on commit 03a5f40

Please sign in to comment.