mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
fix / compilation
This commit is contained in:
parent
1d11a163af
commit
7e6e09bc19
1 changed files with 2 additions and 4 deletions
|
@ -43,8 +43,7 @@ import javax.inject.Inject
|
|||
* this pattern allow decoupling between the object responsible of displaying notifications and the matrix sdk.
|
||||
*/
|
||||
class NotifiableEventResolver @Inject constructor(private val stringProvider: StringProvider,
|
||||
private val noticeEventFormatter: NoticeEventFormatter,
|
||||
private val cryptoService: CryptoService) {
|
||||
private val noticeEventFormatter: NoticeEventFormatter) {
|
||||
|
||||
//private val eventDisplay = RiotEventDisplay(context)
|
||||
|
||||
|
@ -52,7 +51,6 @@ class NotifiableEventResolver @Inject constructor(private val stringProvider: St
|
|||
val roomID = event.roomId ?: return null
|
||||
val eventId = event.eventId ?: return null
|
||||
val timelineEvent = session.getRoom(roomID)?.getTimeLineEvent(eventId) ?: return null
|
||||
|
||||
when (event.getClearType()) {
|
||||
EventType.MESSAGE -> {
|
||||
return resolveMessageEvent(timelineEvent, session)
|
||||
|
@ -119,7 +117,7 @@ class NotifiableEventResolver @Inject constructor(private val stringProvider: St
|
|||
//TODO use a global event decryptor? attache to session and that listen to new sessionId?
|
||||
//for now decrypt sync
|
||||
try {
|
||||
val result = cryptoService.decryptEvent(event.root, event.root.roomId + UUID.randomUUID().toString())
|
||||
val result = session.decryptEvent(event.root, event.root.roomId + UUID.randomUUID().toString())
|
||||
event.root.mxDecryptionResult = OlmDecryptionResult(
|
||||
payload = result.clearEvent,
|
||||
senderKey = result.senderCurve25519Key,
|
||||
|
|
Loading…
Add table
Reference in a new issue