Skip to content

Commit 4363031

Browse files
authored
Do not read metadata from muc config form. (#1225)
1 parent f02448c commit 4363031

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

jicofo-common/src/main/kotlin/org/jitsi/jicofo/xmpp/muc/ChatRoomImpl.kt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,6 @@ class ChatRoomImpl(
259259
val config = muc.configurationForm
260260
parseConfigForm(config)
261261

262-
// We only read the initial metadata from the config form. Setting room metadata after a config form reload may
263-
// race with updates coming via [RoomMetadataHandler].
264-
config.getRoomMetadata()?.let {
265-
setRoomMetadata(it)
266-
}
267-
268262
// Make the room non-anonymous, so that others can recognize focus JID
269263
val answer = config.fillableForm
270264
answer.setAnswer(MucConfigFields.WHOIS, "anyone")
@@ -298,18 +292,6 @@ class ChatRoomImpl(
298292
participantsSoftLimit = configForm.getField(MucConfigFields.PARTICIPANTS_SOFT_LIMIT)?.firstValue?.toInt()
299293
}
300294

301-
private fun Form.getRoomMetadata(): RoomMetadata? {
302-
getField("muc#roominfo_jitsimetadata")?.firstValue?.let {
303-
try {
304-
return RoomMetadata.parse(it)
305-
} catch (e: Exception) {
306-
logger.warn("Invalid room metadata content", e)
307-
return null
308-
}
309-
}
310-
return null
311-
}
312-
313295
override fun leave() {
314296
muc.removePresenceInterceptor(presenceInterceptor)
315297
muc.removeUserStatusListener(userListener)

0 commit comments

Comments
 (0)