More explicit val naming

This commit is contained in:
Valere 2019-12-12 15:29:56 +01:00
parent 35404b9a7f
commit 9842cac504
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ data class MessageVerificationRequestContent(
@Json(name = "body") override val body: String, @Json(name = "body") override val body: String,
@Json(name = "from_device") val fromDevice: String, @Json(name = "from_device") val fromDevice: String,
@Json(name = "methods") val methods: List<String>, @Json(name = "methods") val methods: List<String>,
@Json(name = "to") val to: String, @Json(name = "to") val toUserId: String,
// @Json(name = "timestamp") val timestamp: Int, // @Json(name = "timestamp") val timestamp: Int,
@Json(name = "format") val format: String? = null, @Json(name = "format") val format: String? = null,
@Json(name = "formatted_body") val formattedBody: String? = null, @Json(name = "formatted_body") val formattedBody: String? = null,

View File

@ -286,7 +286,7 @@ internal class LocalEchoEventFactory @Inject constructor(
) )
} }
fun createVerificationRequest(roomId: String, fromDevice: String, to: String, methods: List<String>): Event { fun createVerificationRequest(roomId: String, fromDevice: String, toUserId: String, methods: List<String>): Event {
val localID = LocalEcho.createLocalEchoId() val localID = LocalEcho.createLocalEchoId()
return Event( return Event(
roomId = roomId, roomId = roomId,
@ -297,7 +297,7 @@ internal class LocalEchoEventFactory @Inject constructor(
content = MessageVerificationRequestContent( content = MessageVerificationRequestContent(
body = stringProvider.getString(R.string.key_verification_request_fallback_message, userId), body = stringProvider.getString(R.string.key_verification_request_fallback_message, userId),
fromDevice = fromDevice, fromDevice = fromDevice,
to = to, toUserId = toUserId,
methods = methods methods = methods
).toContent(), ).toContent(),
unsignedData = UnsignedData(age = null, transactionId = localID) unsignedData = UnsignedData(age = null, transactionId = localID)