depulicate 'propose's when doing mam catchup
This commit is contained in:
parent
e16e0d895e
commit
172d2c693f
|
@ -92,8 +92,8 @@ android {
|
|||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
versionCode 368
|
||||
versionName "2.8.0-alpha.2"
|
||||
versionCode 369
|
||||
versionName "2.8.0-alpha.3"
|
||||
archivesBaseName += "-$versionName"
|
||||
applicationId "eu.siacs.conversations"
|
||||
resValue "string", "applicationId", applicationId
|
||||
|
|
|
@ -854,6 +854,12 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
|
|||
final String namespace = description == null ? null : description.getNamespace();
|
||||
if (Namespace.JINGLE_APPS_RTP.equals(namespace)) {
|
||||
final Conversation c = mXmppConnectionService.findOrCreateConversation(account, counterpart.asBareJid(), false, false);
|
||||
final Message preExistingMessage = c.findRtpSession(sessionId, status);
|
||||
if (preExistingMessage != null) {
|
||||
preExistingMessage.setServerMsgId(serverMsgId);
|
||||
mXmppConnectionService.updateMessage(preExistingMessage);
|
||||
break;
|
||||
}
|
||||
final Message message = new Message(
|
||||
c,
|
||||
status,
|
||||
|
|
|
@ -349,8 +349,11 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
sendSessionAccept(offer);
|
||||
}
|
||||
|
||||
private void sendSessionAccept(SessionDescription offer) {
|
||||
discoverIceServers(iceServers -> {
|
||||
private void sendSessionAccept(final SessionDescription offer) {
|
||||
discoverIceServers(iceServers -> sendSessionAccept(offer,iceServers));
|
||||
}
|
||||
|
||||
private void sendSessionAccept(final SessionDescription offer, final List<PeerConnection.IceServer> iceServers) {
|
||||
try {
|
||||
setupWebRTC(iceServers);
|
||||
} catch (WebRTCWrapper.InitializationException e) {
|
||||
|
@ -373,7 +376,6 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
Log.d(Config.LOGTAG, "unable to send session accept", e);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void addIceCandidatesFromBlackLog() {
|
||||
|
@ -532,7 +534,10 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
|
||||
private void sendSessionInitiate(final State targetState) {
|
||||
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": prepare session-initiate");
|
||||
discoverIceServers(iceServers -> {
|
||||
discoverIceServers(iceServers -> sendSessionInitiate(targetState, iceServers));
|
||||
}
|
||||
|
||||
private void sendSessionInitiate(final State targetState, final List<PeerConnection.IceServer> iceServers) {
|
||||
try {
|
||||
setupWebRTC(iceServers);
|
||||
} catch (WebRTCWrapper.InitializationException e) {
|
||||
|
@ -556,14 +561,12 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
transitionOrThrow(State.TERMINATED_APPLICATION_FAILURE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void sendSessionInitiate(RtpContentMap rtpContentMap, final State targetState) {
|
||||
this.initiatorRtpContentMap = rtpContentMap;
|
||||
this.transitionOrThrow(targetState);
|
||||
final JinglePacket sessionInitiate = rtpContentMap.toJinglePacket(JinglePacket.Action.SESSION_INITIATE, id.sessionId);
|
||||
Log.d(Config.LOGTAG, sessionInitiate.toString());
|
||||
send(sessionInitiate);
|
||||
}
|
||||
|
||||
|
@ -591,7 +594,6 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
|||
return;
|
||||
}
|
||||
final JinglePacket jinglePacket = transportInfo.toJinglePacket(JinglePacket.Action.TRANSPORT_INFO, id.sessionId);
|
||||
Log.d(Config.LOGTAG, jinglePacket.toString());
|
||||
send(jinglePacket);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue