diff --git a/app/src/main/java/eu/steffo/twom/viewroom/components/ViewRoomForm.kt b/app/src/main/java/eu/steffo/twom/viewroom/components/ViewRoomForm.kt index 8596ad8..90903d4 100644 --- a/app/src/main/java/eu/steffo/twom/viewroom/components/ViewRoomForm.kt +++ b/app/src/main/java/eu/steffo/twom/viewroom/components/ViewRoomForm.kt @@ -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