Skip to content

Commit

Permalink
added log
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahroz16 committed Sep 10, 2024
1 parent 6328459 commit 3654a2c
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ internal fun routeChangeMiddleware() = middleware<InAppMessagingState> { store,
val currentMessageRouteRule = currentMessage.getRouteRule()
val isCurrentMessageRouteAllowedOnNewRoute = currentMessageRouteRule == null || runCatching { currentMessageRouteRule.toRegex().matches(action.route) }.getOrNull() ?: true
if (!isCurrentMessageRouteAllowedOnNewRoute) {
SDKComponent.logger.debug("Dismissing message: ${currentMessage.queueId} because route does not match current route: ${action.route}")
store.dispatch(InAppMessagingAction.DismissMessage(message = currentMessage, shouldLog = false))
}
}
Expand Down

0 comments on commit 3654a2c

Please sign in to comment.