debug(marmot): log removeMarmotGroupMember + syncMetadataTo transitions
The bug report: after tapping Remove on the Marmot Group Info screen, the target npub stays in the member list, and the only log line is the round-tripped kind:445 hitting the "Duplicate" branch in GroupEventHandler.add. The author-side path (Account.removeMarmotGroupMember → MarmotManager.removeMember → syncMetadataTo → publish) has no logging, so there's no way to tell which step broke — the MLS tree mutation, the local member-list push to chatroom.members, or the UI recomposition. Mirror the addMarmotGroupMember logging style on removeMarmotGroupMember (entry, no-op guards, built commit id, publish) so we can see whether the author path even runs end-to-end, and have syncMetadataTo log the group id and the previous→new member count so the StateFlow update becomes observable. No behavior change.
This commit is contained in:
+5
@@ -566,9 +566,14 @@ class MarmotManager(
|
||||
chatroom.adminPubkeys.value = metadata.adminPubkeys
|
||||
chatroom.relays.value = metadata.relays
|
||||
}
|
||||
val previousCount = chatroom.members.value.size
|
||||
val members = memberPubkeys(nostrGroupId)
|
||||
chatroom.members.value = members
|
||||
chatroom.memberCount.value = members.size
|
||||
Log.d("MarmotDbg") {
|
||||
"syncMetadataTo: group=${nostrGroupId.take(8)}… members $previousCount→${members.size} " +
|
||||
"(leafs=${members.map { it.leafIndex }})"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user