diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/EncryptEventWorker.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/EncryptEventWorker.kt index f7503672e5..9e68f6d13e 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/EncryptEventWorker.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/session/room/send/EncryptEventWorker.kt @@ -44,10 +44,8 @@ internal class EncryptEventWorker(context: Context, params: WorkerParameters) val keepKeys: List? = null ) : SessionWorkerParams - @Inject - lateinit var crypto: CryptoService - @Inject - lateinit var localEchoUpdater: LocalEchoUpdater + @Inject lateinit var crypto: CryptoService + @Inject lateinit var localEchoUpdater: LocalEchoUpdater override fun doWork(): Result { diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/util/JsonCanonicalizer.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/util/JsonCanonicalizer.kt index 41dd0f7d1b..f7fd3cf4f6 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/util/JsonCanonicalizer.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/util/JsonCanonicalizer.kt @@ -100,7 +100,7 @@ object JsonCanonicalizer { return result.toString() } - is String -> return JSONObject.quote(src.toString()) + is String -> return JSONObject.quote(src) else -> return src.toString() } } diff --git a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/action/MessageActionsViewModel.kt b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/action/MessageActionsViewModel.kt index bc0091b8e7..37e38a5fb4 100644 --- a/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/action/MessageActionsViewModel.kt +++ b/vector/src/main/java/im/vector/riotredesign/features/home/room/detail/timeline/action/MessageActionsViewModel.kt @@ -48,7 +48,8 @@ data class MessageActionState( fun senderName(): String = informationData.memberName?.toString() ?: "" - fun time(): String? = dateFormat.format(Date(timelineEvent?.root?.originServerTs ?: 0)) + fun time(): String? = timelineEvent?.root?.originServerTs?.let { dateFormat.format(Date(it)) } + ?: "" fun canReact(): Boolean = timelineEvent?.root?.type == EventType.MESSAGE && timelineEvent.sendState.isSent()