Renaming a method to reflect its implementation

This commit is contained in:
Maxime NATUREL 2022-07-18 10:56:34 +02:00
parent 17227f1ae6
commit 7b15193eff

View file

@ -45,13 +45,13 @@ internal class DefaultRedactLiveLocationShareTask @Inject constructor(
val relatedEventIds = getRelatedEventIdsOfLive(params.beaconInfoEventId) val relatedEventIds = getRelatedEventIdsOfLive(params.beaconInfoEventId)
Timber.d("beacon with id ${params.beaconInfoEventId} has related event ids: ${relatedEventIds.joinToString(", ")}") Timber.d("beacon with id ${params.beaconInfoEventId} has related event ids: ${relatedEventIds.joinToString(", ")}")
redactEvent( postRedactionWithLocalEcho(
eventId = params.beaconInfoEventId, eventId = params.beaconInfoEventId,
roomId = params.roomId, roomId = params.roomId,
reason = params.reason reason = params.reason
) )
relatedEventIds.forEach { eventId -> relatedEventIds.forEach { eventId ->
redactEvent( postRedactionWithLocalEcho(
eventId = eventId, eventId = eventId,
roomId = params.roomId, roomId = params.roomId,
reason = params.reason reason = params.reason
@ -69,8 +69,8 @@ internal class DefaultRedactLiveLocationShareTask @Inject constructor(
} }
} }
private fun redactEvent(eventId: String, roomId: String, reason: String?) { private fun postRedactionWithLocalEcho(eventId: String, roomId: String, reason: String?) {
Timber.d("redacting event of id $eventId") Timber.d("posting redaction for event of id $eventId")
val redactionEcho = localEchoEventFactory.createRedactEvent(roomId, eventId, reason) val redactionEcho = localEchoEventFactory.createRedactEvent(roomId, eventId, reason)
localEchoEventFactory.createLocalEcho(redactionEcho) localEchoEventFactory.createLocalEcho(redactionEcho)
eventSenderProcessor.postRedaction(redactionEcho, reason) eventSenderProcessor.postRedaction(redactionEcho, reason)