m.notice messages trigger push notifications (#238)

This commit is contained in:
Benoit Marty 2019-09-20 16:31:13 +02:00
parent d3d4deb884
commit faa8e6bbb2
3 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,7 @@ Bugfix:
- "No connection" banner was displayed by mistake
- Leaving community (from another client) has no effect on RiotX (#497)
- Push rules was not retrieved after a clear cache
- m.notice messages trigger push notifications (#238)
Translations:
-

View File

@ -87,7 +87,8 @@ internal class DefaultPushRuleService @Inject constructor(private val getPushRul
}
}
return contentRules + overrideRules + roomRules + senderRules + underrideRules
// Ref. for the order: https://matrix.org/docs/spec/client_server/latest#push-rules
return overrideRules + contentRules + roomRules + senderRules + underrideRules
}
override fun updatePushRuleEnableStatus(kind: RuleKind, pushRule: PushRule, enabled: Boolean, callback: MatrixCallback<Unit>): Cancelable {

View File

@ -106,7 +106,7 @@ internal class TimelineEventDecryptor(
Timber.v("Successfully decrypted event ${eventId}")
eventEntity.setDecryptionResult(result)
} catch (e: MXCryptoError) {
Timber.v("Failed to decrypte event ${eventId} ${e}")
Timber.v("Failed to decrypt event ${eventId} ${e}")
if (e is MXCryptoError.Base && e.errorType == MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID) {
//Keep track of unknown sessions to automatically try to decrypt on new session
eventEntity.decryptionErrorCode = e.errorType.name