Privacy: does not log reaction (it is a vlog, so not critical)

This commit is contained in:
Benoit Marty 2022-04-07 10:15:21 +02:00
parent 1a53d2c8da
commit dbf10a222f
2 changed files with 6 additions and 6 deletions

View file

@ -584,11 +584,11 @@ internal class EventRelationsAggregationProcessor @Inject constructor(
sum.key = reaction sum.key = reaction
sum.firstTimestamp = event.originServerTs ?: 0 sum.firstTimestamp = event.originServerTs ?: 0
if (isLocalEcho) { if (isLocalEcho) {
Timber.v("Adding local echo reaction $reaction") Timber.v("Adding local echo reaction")
sum.sourceLocalEcho.add(txId) sum.sourceLocalEcho.add(txId)
sum.count = 1 sum.count = 1
} else { } else {
Timber.v("Adding synced reaction $reaction") Timber.v("Adding synced reaction")
sum.count = 1 sum.count = 1
sum.sourceEvents.add(reactionEventId) sum.sourceEvents.add(reactionEventId)
} }
@ -600,16 +600,16 @@ internal class EventRelationsAggregationProcessor @Inject constructor(
// check if it's not the sync of a local echo // check if it's not the sync of a local echo
if (!isLocalEcho && sum.sourceLocalEcho.contains(txId)) { if (!isLocalEcho && sum.sourceLocalEcho.contains(txId)) {
// ok it has already been counted, just sync the list, do not touch count // ok it has already been counted, just sync the list, do not touch count
Timber.v("Ignoring synced of local echo for reaction $reaction") Timber.v("Ignoring synced of local echo for reaction")
sum.sourceLocalEcho.remove(txId) sum.sourceLocalEcho.remove(txId)
sum.sourceEvents.add(reactionEventId) sum.sourceEvents.add(reactionEventId)
} else { } else {
sum.count += 1 sum.count += 1
if (isLocalEcho) { if (isLocalEcho) {
Timber.v("Adding local echo reaction $reaction") Timber.v("Adding local echo reaction")
sum.sourceLocalEcho.add(txId) sum.sourceLocalEcho.add(txId)
} else { } else {
Timber.v("Adding synced reaction $reaction") Timber.v("Adding synced reaction")
sum.sourceEvents.add(reactionEventId) sum.sourceEvents.add(reactionEventId)
} }

View file

@ -251,7 +251,7 @@ internal class DefaultFetchThreadTimelineTask @Inject constructor(
sum = realm.createObject(ReactionAggregatedSummaryEntity::class.java) sum = realm.createObject(ReactionAggregatedSummaryEntity::class.java)
sum.key = reaction sum.key = reaction
sum.firstTimestamp = event.originServerTs ?: 0 sum.firstTimestamp = event.originServerTs ?: 0
Timber.v("Adding synced reaction $reaction") Timber.v("Adding synced reaction")
sum.count = 1 sum.count = 1
// reactionEventId not included in the /relations API // reactionEventId not included in the /relations API
// sum.sourceEvents.add(reactionEventId) // sum.sourceEvents.add(reactionEventId)