Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
fa30f7e0
Commit
fa30f7e0
authored
Mar 08, 2018
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-1504: Caching the session will prevent carbons.
parent
d727b51c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
17 deletions
+1
-17
LocalMUCRole.java
src/java/org/jivesoftware/openfire/muc/spi/LocalMUCRole.java
+1
-17
No files found.
src/java/org/jivesoftware/openfire/muc/spi/LocalMUCRole.java
View file @
fa30f7e0
...
@@ -26,8 +26,6 @@ import org.jivesoftware.openfire.muc.MUCRole;
...
@@ -26,8 +26,6 @@ import org.jivesoftware.openfire.muc.MUCRole;
import
org.jivesoftware.openfire.muc.MUCRoom
;
import
org.jivesoftware.openfire.muc.MUCRoom
;
import
org.jivesoftware.openfire.muc.MultiUserChatService
;
import
org.jivesoftware.openfire.muc.MultiUserChatService
;
import
org.jivesoftware.openfire.muc.NotAllowedException
;
import
org.jivesoftware.openfire.muc.NotAllowedException
;
import
org.jivesoftware.openfire.session.ClientSession
;
import
org.jivesoftware.openfire.session.Session
;
import
org.jivesoftware.util.ElementUtil
;
import
org.jivesoftware.util.ElementUtil
;
import
org.xmpp.packet.JID
;
import
org.xmpp.packet.JID
;
import
org.xmpp.packet.Packet
;
import
org.xmpp.packet.Packet
;
...
@@ -96,12 +94,6 @@ public class LocalMUCRole implements MUCRole {
...
@@ -96,12 +94,6 @@ public class LocalMUCRole implements MUCRole {
*/
*/
private
Element
extendedInformation
;
private
Element
extendedInformation
;
/**
* Cache session of local user that is a room occupant. If the room occupant is not a local
* user then nothing will be cached and packets will be sent through the PacketRouter.
*/
private
ClientSession
session
;
/**
/**
* Create a new role.
* Create a new role.
*
*
...
@@ -125,8 +117,6 @@ public class LocalMUCRole implements MUCRole {
...
@@ -125,8 +117,6 @@ public class LocalMUCRole implements MUCRole {
this
.
router
=
packetRouter
;
this
.
router
=
packetRouter
;
this
.
role
=
role
;
this
.
role
=
role
;
this
.
affiliation
=
affiliation
;
this
.
affiliation
=
affiliation
;
// Cache the user's session (will only work for local users)
this
.
session
=
XMPPServer
.
getInstance
().
getSessionManager
().
getSession
(
presence
.
getFrom
());
extendedInformation
=
extendedInformation
=
DocumentHelper
.
createElement
(
QName
.
get
(
"x"
,
"http://jabber.org/protocol/muc#user"
));
DocumentHelper
.
createElement
(
QName
.
get
(
"x"
,
"http://jabber.org/protocol/muc#user"
));
...
@@ -267,14 +257,8 @@ public class LocalMUCRole implements MUCRole {
...
@@ -267,14 +257,8 @@ public class LocalMUCRole implements MUCRole {
}
}
packet
.
setTo
(
user
.
getAddress
());
packet
.
setTo
(
user
.
getAddress
());
if
(
session
!=
null
&&
session
.
getStatus
()
==
Session
.
STATUS_AUTHENTICATED
)
{
// Send the packet directly to the local user session
session
.
process
(
packet
);
}
else
{
router
.
route
(
packet
);
router
.
route
(
packet
);
}
}
}
/**
/**
* Calculates and sets the extended presence information to add to the presence.
* Calculates and sets the extended presence information to add to the presence.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment