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
04a3d984
You need to sign in or sign up before continuing.
Unverified
Commit
04a3d984
authored
Mar 09, 2018
by
Dave Cridland
Committed by
GitHub
Mar 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1038 from guusdk/OF-1504_MUC-PM-carbons
OF-1504: Caching the session will prevent carbons.
parents
fb100cf0
fa30f7e0
Changes
1
Hide 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 @
04a3d984
...
@@ -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,13 +257,7 @@ public class LocalMUCRole implements MUCRole {
...
@@ -267,13 +257,7 @@ public class LocalMUCRole implements MUCRole {
}
}
packet
.
setTo
(
user
.
getAddress
());
packet
.
setTo
(
user
.
getAddress
());
if
(
session
!=
null
&&
session
.
getStatus
()
==
Session
.
STATUS_AUTHENTICATED
)
{
router
.
route
(
packet
);
// Send the packet directly to the local user session
session
.
process
(
packet
);
}
else
{
router
.
route
(
packet
);
}
}
}
/**
/**
...
...
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