Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Mar 26, 2024
1 parent 4bb0bbe commit b3ca076
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions schemas/Error.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{"const": "Rust", "description": "Shared / cross-platform crypto module written in Rust."}
]
},
"eventLocalAge": {
"eventLocalAgeMillis": {
"description": "An heuristic based on event origin_server_ts and the current device creation time (origin_server_ts - device_ts). This would be used to get the source of the event scroll-back/live/initialSync.",
"type": "integer"
},
Expand All @@ -62,7 +62,7 @@
"type": "boolean"
},
"isMatrixDotOrg": {
"description": "true if the current user is using Matrix.org",
"description": "true if the current user is using matrix.org",
"type": "boolean"
},
"isFederated": {
Expand Down
4 changes: 2 additions & 2 deletions types/kotlin/Error.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data class Error (
* (origin_server_ts - device_ts). This would be used to get the source of the event
* scroll-back/live/initialSync.
*/
val eventLocalAge: Long? = null,
val eventLocalAgeMillis: Long? = null,

val eventName: EventName,

Expand All @@ -36,7 +36,7 @@ data class Error (
val isFederated: Boolean? = null,

/**
* true if the current user is using Matrix.org
* true if the current user is using matrix.org
*/
val isMatrixDotOrg: Boolean? = null,

Expand Down
6 changes: 3 additions & 3 deletions types/kotlin2/Error.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ data class Error(
* creation time (origin_server_ts - device_ts). This would be used to
* get the source of the event scroll-back/live/initialSync.
*/
val eventLocalAge: Int? = null,
val eventLocalAgeMillis: Int? = null,
/**
* true if userDomain != senderDomain.
*/
val isFederated: Boolean? = null,
/**
* true if the current user is using Matrix.org
* true if the current user is using matrix.org
*/
val isMatrixDotOrg: Boolean? = null,
val name: Name,
Expand Down Expand Up @@ -171,7 +171,7 @@ data class Error(
cryptoModule?.let { put("cryptoModule", it.name) }
cryptoSDK?.let { put("cryptoSDK", it.name) }
put("domain", domain.name)
eventLocalAge?.let { put("eventLocalAge", it) }
eventLocalAgeMillis?.let { put("eventLocalAgeMillis", it) }
isFederated?.let { put("isFederated", it) }
isMatrixDotOrg?.let { put("isMatrixDotOrg", it) }
put("name", name.name)
Expand Down
10 changes: 5 additions & 5 deletions types/swift/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ extension AnalyticsEvent {
public let cryptoSDK: CryptoSDK?
public let domain: Domain
/// An heuristic based on event origin_server_ts and the current device creation time (origin_server_ts - device_ts). This would be used to get the source of the event scroll-back/live/initialSync.
public let eventLocalAge: Int?
public let eventLocalAgeMillis: Int?
/// true if userDomain != senderDomain.
public let isFederated: Bool?
/// true if the current user is using Matrix.org
/// true if the current user is using matrix.org
public let isMatrixDotOrg: Bool?
public let name: Name
/// UTDs can be permanent or temporary. If temporary, this field will contain the time it took to decrypt the message in milliseconds. If permanent should be -1
Expand All @@ -45,12 +45,12 @@ extension AnalyticsEvent {
/// true if that unable to decrypt error was visible to the user
public let wasVisibleToUser: Bool?

public init(context: String?, cryptoModule: CryptoModule?, cryptoSDK: CryptoSDK?, domain: Domain, eventLocalAge: Int?, isFederated: Bool?, isMatrixDotOrg: Bool?, name: Name, timeToDecryptMillis: Int?, userTrustsOwnIdentity: Bool?, wasVisibleToUser: Bool?) {
public init(context: String?, cryptoModule: CryptoModule?, cryptoSDK: CryptoSDK?, domain: Domain, eventLocalAgeMillis: Int?, isFederated: Bool?, isMatrixDotOrg: Bool?, name: Name, timeToDecryptMillis: Int?, userTrustsOwnIdentity: Bool?, wasVisibleToUser: Bool?) {
self.context = context
self.cryptoModule = cryptoModule
self.cryptoSDK = cryptoSDK
self.domain = domain
self.eventLocalAge = eventLocalAge
self.eventLocalAgeMillis = eventLocalAgeMillis
self.isFederated = isFederated
self.isMatrixDotOrg = isMatrixDotOrg
self.name = name
Expand Down Expand Up @@ -110,7 +110,7 @@ extension AnalyticsEvent {
"cryptoModule": cryptoModule?.rawValue as Any,
"cryptoSDK": cryptoSDK?.rawValue as Any,
"domain": domain.rawValue,
"eventLocalAge": eventLocalAge as Any,
"eventLocalAgeMillis": eventLocalAgeMillis as Any,
"isFederated": isFederated as Any,
"isMatrixDotOrg": isMatrixDotOrg as Any,
"name": name.rawValue,
Expand Down

0 comments on commit b3ca076

Please sign in to comment.