From c2111fd0fac3ce5132bc30b70217dc40830455cb Mon Sep 17 00:00:00 2001 From: bgrozev Date: Thu, 26 Oct 2023 13:58:22 -0700 Subject: [PATCH] Avoid using XmlStringBuilder.toString() (#529) * chore: Update jitsi-xmpp-extensions. * fix: Avoid using XmlStringBuilder.toString(). --- pom.xml | 2 +- src/main/kotlin/org/jitsi/jibri/api/xmpp/XmppApi.kt | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index fdd12b1b..0b87d1dc 100644 --- a/pom.xml +++ b/pom.xml @@ -105,7 +105,7 @@ ${project.groupId} jitsi-xmpp-extensions - 1.0-31-ga0e3d14 + 1.0-78-g62d03d4 com.datadoghq diff --git a/src/main/kotlin/org/jitsi/jibri/api/xmpp/XmppApi.kt b/src/main/kotlin/org/jitsi/jibri/api/xmpp/XmppApi.kt index fb52bd3d..55c9232b 100644 --- a/src/main/kotlin/org/jitsi/jibri/api/xmpp/XmppApi.kt +++ b/src/main/kotlin/org/jitsi/jibri/api/xmpp/XmppApi.kt @@ -53,6 +53,7 @@ import org.jitsi.xmpp.mucclient.IQListener import org.jitsi.xmpp.mucclient.MucClient import org.jitsi.xmpp.mucclient.MucClientConfiguration import org.jitsi.xmpp.mucclient.MucClientManager +import org.jitsi.xmpp.util.XmlStringBuilderUtil.Companion.toStringOpt import org.jivesoftware.smack.ConnectionConfiguration import org.jivesoftware.smack.packet.IQ import org.jivesoftware.smack.packet.StanzaError @@ -235,7 +236,7 @@ class XmppApi( * that this [JibriIq] was received on. */ private fun handleJibriIq(jibriIq: JibriIq, mucClient: MucClient): IQ { - logger.info("Received JibriIq ${jibriIq.toXML()} from environment $mucClient") + logger.info("Received JibriIq ${jibriIq.toStringOpt()} from environment $mucClient") val xmppEnvironment = getXmppEnvironment(mucClient) ?: return IQ.createErrorResponse( jibriIq, @@ -318,7 +319,7 @@ class XmppApi( shouldRetry = serviceState.error.shouldRetry() logger.info( "Current service had an error ${serviceState.error}, " + - "sending error iq ${toXML()}" + "sending error iq ${toStringOpt()}" ) mucClient.sendStanza(this) } @@ -326,14 +327,14 @@ class XmppApi( is ComponentState.Finished -> { with(JibriIqHelper.create(request.from, status = JibriIq.Status.OFF)) { sipAddress = request.sipAddress - logger.info("Current service finished, sending off iq ${toXML()}") + logger.info("Current service finished, sending off iq ${toStringOpt()}") mucClient.sendStanza(this) } } is ComponentState.Running -> { with(JibriIqHelper.create(request.from, status = JibriIq.Status.ON)) { sipAddress = request.sipAddress - logger.info("Current service started up successfully, sending on iq ${toXML()}") + logger.info("Current service started up successfully, sending on iq ${toStringOpt()}") mucClient.sendStanza(this) } }