-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit 26bdb26 Author: Dominik Fuchß <[email protected]> Date: Sat Aug 3 00:53:19 2024 +0200 Fix IDs in edited messages commit 9cf9422 Author: Dominik Fuchß <[email protected]> Date: Fri Aug 2 23:09:46 2024 +0200 Simplify more code. commit 815cd35 Author: Dominik Fuchß <[email protected]> Date: Fri Aug 2 22:53:36 2024 +0200 Simplify using outbox commit 2779a9b Author: Dominik Fuchß <[email protected]> Date: Fri Aug 2 22:03:07 2024 +0200 Start work on outbox
- Loading branch information
Showing
4 changed files
with
108 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.fuchss.matrix.yarb | ||
|
||
import net.folivo.trixnity.client.room.RoomService | ||
import net.folivo.trixnity.core.model.EventId | ||
import org.fuchss.matrix.bots.firstWithTimeout | ||
|
||
suspend fun RoomService.getMessageId(transactionId: String): EventId? { | ||
val outboxWithTransaction = this.getOutbox().firstWithTimeout { it[transactionId] != null } ?: return null | ||
val transaction = outboxWithTransaction[transactionId] ?: return null | ||
return transaction.firstWithTimeout { it?.eventId != null }?.eventId | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters