Skip to content
Snippets Groups Projects
Commit be6b8ff9 authored by Taras's avatar Taras
Browse files

Fix notifications mapping

parent 43d39ef3
No related branches found
No related tags found
No related merge requests found
...@@ -209,8 +209,7 @@ class NotifiableEventResolver @Inject constructor( ...@@ -209,8 +209,7 @@ class NotifiableEventResolver @Inject constructor(
payload = result.clearEvent, payload = result.clearEvent,
senderKey = result.senderCurve25519Key, senderKey = result.senderCurve25519Key,
keysClaimed = result.claimedEd25519Key?.let { mapOf("ed25519" to it) }, keysClaimed = result.claimedEd25519Key?.let { mapOf("ed25519" to it) },
forwardingCurve25519KeyChain = result.forwardingCurve25519KeyChain, forwardingCurve25519KeyChain = result.forwardingCurve25519KeyChain
isSafe = result.isSafe
) )
} catch (ignore: MXCryptoError) { } catch (ignore: MXCryptoError) {
} }
......
...@@ -3,9 +3,9 @@ package org.futo.circles.model ...@@ -3,9 +3,9 @@ package org.futo.circles.model
import org.matrix.android.sdk.api.session.pushrules.Action import org.matrix.android.sdk.api.session.pushrules.Action
data class NotificationAction( data class NotificationAction(
val shouldNotify: Boolean, val shouldNotify: Boolean,
val highlight: Boolean, val highlight: Boolean,
val soundName: String? val soundName: String?
) )
fun List<Action>.toNotificationAction(): NotificationAction { fun List<Action>.toNotificationAction(): NotificationAction {
...@@ -15,7 +15,6 @@ fun List<Action>.toNotificationAction(): NotificationAction { ...@@ -15,7 +15,6 @@ fun List<Action>.toNotificationAction(): NotificationAction {
forEach { action -> forEach { action ->
when (action) { when (action) {
is Action.Notify -> shouldNotify = true is Action.Notify -> shouldNotify = true
is Action.DoNotNotify -> shouldNotify = false
is Action.Highlight -> highlight = action.highlight is Action.Highlight -> highlight = action.highlight
is Action.Sound -> sound = action.sound is Action.Sound -> sound = action.sound
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment