Bug fix on state when new commit comes in.

This commit is contained in:
Kgothatso Ngako
2026-07-09 00:13:32 +02:00
parent 498c7edce3
commit adfe49f725
2 changed files with 7 additions and 1 deletions

View File

@@ -263,7 +263,7 @@ abstract class MarmotOutboundDao(
}
}
private suspend fun deliveryWelcome(
suspend fun deliveryWelcome(
nostrGroupId: HexKey,
userPublicKey: HexKey,
welcomeBytes: ByteArray,

View File

@@ -398,6 +398,12 @@ abstract class NostrDao(
groupEvent = groupEvent
)?.let { groupEventResult ->
logger.d("groupEventResult: $groupEventResult")
// Save the mls chatRoom state...
database.chatRoomDao().upsert(
localChatRoom.chatRoom.copy(
mlsGroupState = mlsGroup.saveState().encodeTls().toHex()
)
)
ChatMessage.fromGroupEventResult(
database = database,
activeKeyPair = activeKeyPair,