From d53a92be35fd80325f716e6bcfc8382c0adb7a31 Mon Sep 17 00:00:00 2001 From: Thilo Molitor Date: Sun, 24 Sep 2023 18:27:57 +0200 Subject: [PATCH] Anticipate future XEP-0353 changes by Daniel Gultsch XEP-0353 currently mandates bare jid, but Daniel will update it to mandate full jid. --- Monal/Classes/MLCall.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Monal/Classes/MLCall.m b/Monal/Classes/MLCall.m index ba612cd683..49ac4cc9f7 100644 --- a/Monal/Classes/MLCall.m +++ b/Monal/Classes/MLCall.m @@ -416,7 +416,7 @@ -(void) migrateTo:(MLCall*) otherCall { //send jmi finish with migration before chaning all ids etc. DDLogDebug(@"Migrating call using JMI finish: %@", self); - XMPPMessage* jmiNode = [[XMPPMessage alloc] initToContact:self.contact]; + XMPPMessage* jmiNode = [[XMPPMessage alloc] initWithType:kMessageChatType to:self.fullRemoteJid]; [jmiNode addChildNode:[[MLXMLNode alloc] initWithElement:@"finish" andNamespace:@"urn:xmpp:jingle-message:0" withAttributes:@{ @"id": self.jmiid, } andChildren:@[ @@ -789,7 +789,7 @@ -(void) sendJmiPropose -(void) sendJmiReject { DDLogDebug(@"Rejecting via JMI: %@", self); - XMPPMessage* jmiNode = [[XMPPMessage alloc] initToContact:self.contact]; + XMPPMessage* jmiNode = [[XMPPMessage alloc] initWithType:kMessageChatType to:self.fullRemoteJid]; [jmiNode addChildNode:[[MLXMLNode alloc] initWithElement:@"reject" andNamespace:@"urn:xmpp:jingle-message:0" withAttributes:@{ @"id": self.jmiid, } andChildren:@[ @@ -804,7 +804,7 @@ -(void) sendJmiReject -(void) sendJmiRejectWithTieBreak { DDLogDebug(@"Rejecting with tie-break via JMI: %@", self); - XMPPMessage* jmiNode = [[XMPPMessage alloc] initToContact:self.contact]; + XMPPMessage* jmiNode = [[XMPPMessage alloc] initWithType:kMessageChatType to:self.fullRemoteJid]; [jmiNode addChildNode:[[MLXMLNode alloc] initWithElement:@"reject" andNamespace:@"urn:xmpp:jingle-message:0" withAttributes:@{ @"id": self.jmiid, } andChildren:@[ @@ -820,7 +820,7 @@ -(void) sendJmiRejectWithTieBreak -(void) sendJmiRinging { DDLogDebug(@"Ringing via JMI: %@", self); - XMPPMessage* jmiNode = [[XMPPMessage alloc] initToContact:self.contact]; + XMPPMessage* jmiNode = [[XMPPMessage alloc] initWithType:kMessageChatType to:self.fullRemoteJid]; [jmiNode addChildNode:[[MLXMLNode alloc] initWithElement:@"ringing" andNamespace:@"urn:xmpp:jingle-message:0" withAttributes:@{ @"id": self.jmiid, } andChildren:@[] andData:nil]]; @@ -831,8 +831,8 @@ -(void) sendJmiRinging -(void) sendJmiProceed { DDLogDebug(@"Accepting via JMI: %@", self); - XMPPMessage* jmiNode = [[XMPPMessage alloc] initToContact:self.contact]; - //TODO: XEP says bare jid, but full jid is needed for conversations: jmiNode.to = self.fullRemoteJid; + //xep 0353 mandates bare jid, but daniel will update it to mandate full jid + XMPPMessage* jmiNode = [[XMPPMessage alloc] initWithType:kMessageChatType to:self.fullRemoteJid]; [jmiNode addChildNode:[[MLXMLNode alloc] initWithElement:@"proceed" andNamespace:@"urn:xmpp:jingle-message:0" withAttributes:@{ @"id": self.jmiid, } andChildren:@[] andData:nil]]; @@ -856,7 +856,7 @@ -(void) sendJmiFinishWithReason:(NSString*) reason [self.account send:jingleIQ]; DDLogDebug(@"Finishing via JMI: %@", self); - XMPPMessage* jmiNode = [[XMPPMessage alloc] initToContact:self.contact]; + XMPPMessage* jmiNode = [[XMPPMessage alloc] initWithType:kMessageChatType to:self.fullRemoteJid]; [jmiNode addChildNode:[[MLXMLNode alloc] initWithElement:@"finish" andNamespace:@"urn:xmpp:jingle-message:0" withAttributes:@{ @"id": self.jmiid, } andChildren:@[