send jmi finish alongside session terminate
This commit is contained in:
parent
21b8bf424a
commit
18dea352b0
|
@ -234,7 +234,6 @@ public class MessageGenerator extends AbstractGenerator {
|
|||
final MessagePacket packet = new MessagePacket();
|
||||
packet.setType(MessagePacket.TYPE_CHAT);
|
||||
packet.setTo(with);
|
||||
packet.setId(JingleRtpConnection.JINGLE_MESSAGE_PROPOSE_ID_PREFIX + sessionId);
|
||||
final Element finish = packet.addChild("finish", Namespace.JINGLE_MESSAGE);
|
||||
finish.setAttribute("id", sessionId);
|
||||
final Element reasonElement = finish.addChild("reason", Namespace.JINGLE);
|
||||
|
|
|
@ -1986,6 +1986,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
|
|||
|
||||
protected void sendSessionTerminate(final Reason reason, final String text) {
|
||||
sendSessionTerminate(reason, text, this::writeLogMessage);
|
||||
sendJingleMessageFinish(reason);
|
||||
}
|
||||
|
||||
private void sendTransportInfo(
|
||||
|
@ -2358,6 +2359,15 @@ public class JingleRtpConnection extends AbstractJingleConnection
|
|||
xmppConnectionService.sendMessagePacket(id.account, messagePacket);
|
||||
}
|
||||
|
||||
private void sendJingleMessageFinish(final Reason reason) {
|
||||
final var account = id.getAccount();
|
||||
final MessagePacket messagePacket =
|
||||
xmppConnectionService
|
||||
.getMessageGenerator()
|
||||
.sessionFinish(id.with, id.sessionId, reason);
|
||||
xmppConnectionService.sendMessagePacket(account, messagePacket);
|
||||
}
|
||||
|
||||
private boolean isOmemoEnabled() {
|
||||
final Conversational conversational = message.getConversation();
|
||||
if (conversational instanceof Conversation) {
|
||||
|
|
Loading…
Reference in a new issue