1
Fork 0
mirror of https://github.com/Steffo99/twom.git synced 2024-11-24 09:04:24 +00:00

Fix some hardcoded matrix types

This commit is contained in:
Steffo 2024-05-29 04:07:02 +02:00
parent b35e1915a0
commit 527966d301
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -19,6 +19,7 @@ import eu.steffo.twom.errorhandling.components.LoadingText
import eu.steffo.twom.errorhandling.utils.Display
import eu.steffo.twom.errorhandling.utils.LocalizableError
import eu.steffo.twom.matrix.complocals.LocalSession
import eu.steffo.twom.matrix.utils.TwoMMatrix
import eu.steffo.twom.theme.utils.basePadding
import eu.steffo.twom.viewroom.complocals.LocalRoom
import eu.steffo.twom.viewroom.effects.observeRSVP
@ -94,15 +95,15 @@ fun ViewRoomForm() {
)
try {
room.stateService().sendStateEvent(
eventType = "eu.steffo.twom.rsvp",
eventType = TwoMMatrix.RSVP_STATE_TYPE,
stateKey = session.myUserId,
body = mapOf(
"answer" to answer.value,
"comment" to comment,
TwoMMatrix.RSVP_STATE_ANSWER_FIELD to answer.value,
TwoMMatrix.RSVP_STATE_COMMENT_FIELD to comment,
),
)
} catch (e: Throwable) {
Log.e("Room", "Failed to update eu.steffo.twom.rsvp: $publishError")
Log.e("Room", "Failed to update ${TwoMMatrix.RSVP_STATE_TYPE}: $publishError")
publishError = LocalizableError(R.string.room_error_publish_generic, e)
isPublishRunning = false
return@Publish