Skip to content

Commit

Permalink
Anticipate future XEP-0353 changes by Daniel Gultsch
Browse files Browse the repository at this point in the history
XEP-0353 currently mandates bare jid, but Daniel will update it to mandate full jid.
  • Loading branch information
tmolitor-stud-tu committed Oct 3, 2023
1 parent f90eba7 commit d53a92b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Monal/Classes/MLCall.m
Original file line number Diff line number Diff line change
Expand Up @@ -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:@[
Expand Down Expand Up @@ -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:@[
Expand All @@ -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:@[
Expand All @@ -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]];
Expand All @@ -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]];
Expand All @@ -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:@[
Expand Down

0 comments on commit d53a92b

Please sign in to comment.