cleaning
This commit is contained in:
parent
ff5305ee66
commit
3727affc15
@ -44,7 +44,8 @@ internal class DefaultRequestVerificationDMTask @Inject constructor(
|
||||
private val roomAPI: RoomAPI)
|
||||
: RequestVerificationDMTask {
|
||||
|
||||
override fun createParamsAndLocalEcho(roomId: String, from: String, methods: List<String>, to: String, cryptoService: CryptoService): RequestVerificationDMTask.Params {
|
||||
override fun createParamsAndLocalEcho(roomId: String, from: String, methods: List<String>, to: String, cryptoService: CryptoService)
|
||||
: RequestVerificationDMTask.Params {
|
||||
val event = localEchoEventFactory.createVerificationRequest(roomId, from, to, methods)
|
||||
.also { localEchoEventFactory.saveLocalEcho(monarchy, it) }
|
||||
return RequestVerificationDMTask.Params(
|
||||
@ -52,6 +53,7 @@ internal class DefaultRequestVerificationDMTask @Inject constructor(
|
||||
cryptoService
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun execute(params: RequestVerificationDMTask.Params): SendResponse {
|
||||
val event = handleEncryption(params)
|
||||
val localID = event.eventId!!
|
||||
|
@ -81,8 +81,6 @@ class VerificationItemFactory @Inject constructor(
|
||||
when (event.root.getClearType()) {
|
||||
EventType.KEY_VERIFICATION_CANCEL -> {
|
||||
// Is the request referenced is actually really cancelled?
|
||||
// if (referenceInformationData.referencesInfoData?.verificationStatus?.isCanceled() == false) return ignoredConclusion(event, highlight, callback)
|
||||
|
||||
val cancelContent = event.root.getClearContent().toModel<MessageVerificationCancelContent>()
|
||||
?: return ignoredConclusion(event, highlight, callback)
|
||||
|
||||
@ -115,7 +113,8 @@ class VerificationItemFactory @Inject constructor(
|
||||
}
|
||||
EventType.KEY_VERIFICATION_DONE -> {
|
||||
// Is the request referenced is actually really completed?
|
||||
if (referenceInformationData.referencesInfoData?.verificationStatus != VerificationState.DONE) return ignoredConclusion(event, highlight, callback)
|
||||
if (referenceInformationData.referencesInfoData?.verificationStatus != VerificationState.DONE)
|
||||
return ignoredConclusion(event, highlight, callback)
|
||||
|
||||
// We only tale the one sent by me
|
||||
if (informationData.sentByMe) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user