Skip to content

Commit f254371

Browse files
authored
fix: populate logData() map in JoinExistingMLSConversationUseCase (#3850)
The buildMap block used infix 'to' which creates Pairs but does not insert them into the map. All structured join log lines (Success, Failure, Ignored, Reset) emitted empty JSON {}, making it impossible to correlate errors to specific conversations from logs. Replace 'key to value' with put(key, value).
1 parent 9e0501a commit f254371

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

logic/src/commonMain/kotlin/com/wire/kalium/logic/data/conversation/JoinExistingMLSConversationUseCase.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ internal class JoinExistingMLSConversationUseCaseImpl(
251251
private fun Conversation.logData(
252252
failure: CoreFailure? = null
253253
): Map<String, Any> = buildMap {
254-
"conversationId" to id.toLogString()
255-
"conversationType" to type
256-
"protocol" to CreateConversationParam.Protocol.MLS.name
257-
"protocolInfo" to protocol.toLogMap()
258-
failure?.run { "errorInfo" to "$failure" }
254+
put("conversationId", id.toLogString())
255+
put("conversationType", type)
256+
put("protocol", CreateConversationParam.Protocol.MLS.name)
257+
put("protocolInfo", protocol.toLogMap())
258+
failure?.let { put("errorInfo", "$it") }
259259
}
260260
}

0 commit comments

Comments
 (0)