mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 20:10:04 +03:00
Add logs
This commit is contained in:
parent
395d48f946
commit
243463adbc
3 changed files with 8 additions and 3 deletions
|
@ -1357,7 +1357,9 @@ internal class DefaultCryptoService @Inject constructor(
|
||||||
)
|
)
|
||||||
}?.filter { inboundGroupSession ->
|
}?.filter { inboundGroupSession ->
|
||||||
// Prevent injecting a forged encrypted message and using session_id/sender_key of another room.
|
// Prevent injecting a forged encrypted message and using session_id/sender_key of another room.
|
||||||
inboundGroupSession.roomId == roomId
|
(inboundGroupSession.roomId == roomId).also {
|
||||||
|
Timber.tag(loggerTag.value).d("Forged encrypted message detected for roomId:$roomId")
|
||||||
|
}
|
||||||
}?.forEach { inboundGroupSession ->
|
}?.forEach { inboundGroupSession ->
|
||||||
// Share the sharable session to userId with deviceId
|
// Share the sharable session to userId with deviceId
|
||||||
val exportedKeys = inboundGroupSession.exportKeys(sharedHistory = true)
|
val exportedKeys = inboundGroupSession.exportKeys(sharedHistory = true)
|
||||||
|
|
|
@ -173,7 +173,11 @@ internal class MXMegolmEncryption(
|
||||||
// Need to make a brand new session?
|
// Need to make a brand new session?
|
||||||
session.needsRotation(sessionRotationPeriodMsgs, sessionRotationPeriodMs) ||
|
session.needsRotation(sessionRotationPeriodMsgs, sessionRotationPeriodMs) ||
|
||||||
// Is there a room history visibility change since the last outboundSession
|
// Is there a room history visibility change since the last outboundSession
|
||||||
cryptoStore.needsRotationDueToVisibilityChange(roomId) ||
|
cryptoStore.needsRotationDueToVisibilityChange(roomId).also {
|
||||||
|
if (it) {
|
||||||
|
Timber.tag(loggerTag.value).d("roomId:$roomId Room history visibility change detected since the last outbound session")
|
||||||
|
}
|
||||||
|
} ||
|
||||||
// Determine if we have shared with anyone we shouldn't have
|
// Determine if we have shared with anyone we shouldn't have
|
||||||
session.sharedWithTooManyDevices(devicesInRoom)) {
|
session.sharedWithTooManyDevices(devicesInRoom)) {
|
||||||
Timber.tag(loggerTag.value).d("roomId:$roomId Starting new megolm session because we need to rotate.")
|
Timber.tag(loggerTag.value).d("roomId:$roomId Starting new megolm session because we need to rotate.")
|
||||||
|
|
|
@ -45,7 +45,6 @@ import org.matrix.android.sdk.internal.session.room.membership.admin.MembershipA
|
||||||
import org.matrix.android.sdk.internal.session.room.membership.joining.InviteTask
|
import org.matrix.android.sdk.internal.session.room.membership.joining.InviteTask
|
||||||
import org.matrix.android.sdk.internal.session.room.membership.threepid.InviteThreePidTask
|
import org.matrix.android.sdk.internal.session.room.membership.threepid.InviteThreePidTask
|
||||||
import org.matrix.android.sdk.internal.util.fetchCopied
|
import org.matrix.android.sdk.internal.util.fetchCopied
|
||||||
import timber.log.Timber
|
|
||||||
|
|
||||||
internal class DefaultMembershipService @AssistedInject constructor(
|
internal class DefaultMembershipService @AssistedInject constructor(
|
||||||
@Assisted private val roomId: String,
|
@Assisted private val roomId: String,
|
||||||
|
|
Loading…
Add table
Reference in a new issue