Skip to content

Commit

Permalink
chore: Update smack. (#979)
Browse files Browse the repository at this point in the history
* chore: Update smack.
    * fix: Do not remove the "initial" extension from the presence being sent.
* chore: Update jicoco and jitsi-xmpp-extensions.
  • Loading branch information
bgrozev authored Sep 28, 2022
1 parent ec316a5 commit 21c4a3c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class ChatRoomImpl
/**
* Listener for presence that smack sends on our behalf.
*/
private PresenceListener presenceInterceptor;
private org.jivesoftware.smack.util.Consumer<PresenceBuilder> presenceInterceptor;

/**
* Smack multi user chat backend instance.
Expand Down Expand Up @@ -268,7 +268,7 @@ private void joinAs(Resourcepart nickname) throws SmackException, XMPPException,
{
this.myOccupantJid = JidCreate.entityFullFrom(roomJid, nickname);

this.presenceInterceptor = packet ->
this.presenceInterceptor = presenceBuilder ->
{
// The initial presence sent by smack contains an empty "x"
// extension. If this extension is included in a subsequent stanza,
Expand All @@ -277,9 +277,12 @@ private void joinAs(Resourcepart nickname) throws SmackException, XMPPException,
// room.
synchronized (ChatRoomImpl.this)
{
lastPresenceSent = packet.asBuilder((String) null).removeExtension(
Presence p = presenceBuilder.build();
p.removeExtension(
MUCInitialPresence.ELEMENT,
MUCInitialPresence.NAMESPACE);
MUCInitialPresence.NAMESPACE
);
lastPresenceSent = p.asBuilder();
}
};
if (muc.isJoined())
Expand Down
26 changes: 23 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
<assembly.skipAssembly>false</assembly.skipAssembly>
<jetty.version>11.0.10</jetty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<smack.version>4.4.4</smack.version>
<smack.version>4.4.6</smack.version>
<kotlin.version>1.6.21</kotlin.version>
<kotest.version>5.3.0</kotest.version>
<slf4j.version>1.7.32</slf4j.version>
<jersey.version>3.0.4</jersey.version>
<jitsi.utils.version>1.0-119-ga7b23ff</jitsi.utils.version>
<jicoco.version>1.1-118-ge02029b</jicoco.version>
<jicoco.version>1.1-119-gc527d61</jicoco.version>
<spotbugs.version>4.6.0</spotbugs.version>
<junit.version>5.8.2</junit.version>
</properties>
Expand Down Expand Up @@ -110,6 +110,26 @@
<artifactId>jetty-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-core</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-extensions</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-java8</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-xmlparser-stax</artifactId>
<version>${smack.version}</version>
</dependency>
<dependency>
<groupId>org.igniterealtime.smack</groupId>
<artifactId>smack-tcp</artifactId>
Expand Down Expand Up @@ -156,7 +176,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jitsi-xmpp-extensions</artifactId>
<version>1.0-58-g31445c4</version>
<version>1.0-59-g76a5c13</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down

0 comments on commit 21c4a3c

Please sign in to comment.