Add sendLocation API to Rust Room (#681)

Will be used by the location sharing feature.
This commit is contained in:
Marco Romano 2023-06-27 09:12:17 +02:00 committed by GitHub
parent b437360bc5
commit 4fe7bb6809
3 changed files with 34 additions and 0 deletions

View file

@ -114,4 +114,13 @@ interface MatrixRoom : Closeable {
suspend fun setTopic(topic: String): Result<Unit>
suspend fun reportContent(eventId: EventId, reason: String, blockUserId: UserId?): Result<Unit>
/**
* Share a location message in the room.
*
* @param body A human readable textual representation of the location.
* @param geoUri A geo URI (RFC 5870) representing the location e.g. `geo:51.5008,0.1247;u=35`.
* Respectively: latitude, longitude, and (optional) uncertainty.
*/
suspend fun sendLocation(body: String, geoUri: String): Result<Unit>
}