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
1 changed files with 4 additions and 4 deletions

View File

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