Skip to content

Commit

Permalink
managed context sent
Browse files Browse the repository at this point in the history
  • Loading branch information
vahidlazio committed Mar 28, 2024
1 parent c5742a0 commit ec98165
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Confidence private constructor(

override fun getContext(): Map<String, ConfidenceValue> =
this.root?.let {
getContext().filterKeys { removedKeys.contains(it) } + contextMap
it.getContext().filterKeys { key -> !removedKeys.contains(key) } + contextMap
} ?: contextMap

override fun withContext(context: Map<String, ConfidenceValue>) = Confidence(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ internal class EventSenderEngine(
val event = Event(
eventDefinition = definition,
eventTime = clock.currentTime(),
payload = payload,
context = context
payload = payload + context,
context = mapOf()
)
writeReqChannel.send(event)
}
Expand Down

0 comments on commit ec98165

Please sign in to comment.