Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions src/main/java/org/jitsi/jigasi/JvbConference.java
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,6 @@ private ExtensionElement addSupportedFeatures(
*/
private final ChatRoomPresenceListener presenceListener = new ChatRoomPresenceListener();

/**
* The features for the current xmpp provider we will use later adding to the room presence we send.
*/
private ExtensionElement features = null;

/**
* Whether we are currently joining as a visitor.
*/
Expand Down Expand Up @@ -750,9 +745,6 @@ private synchronized void setXmppProvider(

this.xmppProvider = xmppProvider;

// Advertise gateway features before joining and if possible before connecting
this.features = addSupportedFeatures(xmppProvider.getOperationSet(OperationSetJitsiMeetToolsJabber.class));

xmppProvider.addRegistrationStateChangeListener(this);

this.telephony
Expand Down Expand Up @@ -1022,7 +1014,10 @@ public void joinConferenceRoom()
chatRoom.addPresencePacketExtensions(initiator);
}

chatRoom.addPresencePacketExtensions(this.features);
// we want to add the features just before joining and after connecting
// to make sure EntityCapsManager.currentCapsVersion is properly initialized
chatRoom.addPresencePacketExtensions(
addSupportedFeatures(xmppProvider.getOperationSet(OperationSetJitsiMeetToolsJabber.class)));

String statsId = JigasiBundleActivator.getConfigurationService().getString(STATS_ID_PNAME);
if (StringUtils.isNotEmpty(statsId))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package org.jitsi.jigasi.xmpp;

import static org.jitsi.jigasi.util.Util.*;
import static org.jivesoftware.smack.packet.StanzaError.Condition.internal_server_error;

import net.java.sip.communicator.impl.protocol.jabber.*;
Expand All @@ -34,6 +35,7 @@
import org.jivesoftware.smack.bosh.*;
import org.jivesoftware.smack.iqrequest.*;
import org.jivesoftware.smack.packet.*;
import org.jivesoftware.smackx.disco.*;
import org.jxmpp.jid.parts.*;
import org.osgi.framework.*;

Expand Down Expand Up @@ -301,6 +303,9 @@ private void joinCommonRoom(ProtocolProviderService pps)
conn.registerIQRequestHandler(new HangUpIqHandler(pps));

connectionResource = conn.getUser().getResourceOrNull();

// to make sure EntityCapsManager.currentCapsVersion is properly initialized
ServiceDiscoveryManager.getInstanceFor(conn).addFeature(JIGASI_FEATURE_NAME);
}

OperationSetMultiUserChat muc = pps.getOperationSet(OperationSetMultiUserChat.class);
Expand Down