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
a9c43db1
Commit
a9c43db1
authored
Dec 06, 2015
by
Christian Schudt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-317 Subscribe with Response Unsubscribed Causes Roster Push to Responding Client
parent
02cf1379
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
Roster.java
src/java/org/jivesoftware/openfire/roster/Roster.java
+14
-2
No files found.
src/java/org/jivesoftware/openfire/roster/Roster.java
View file @
a9c43db1
...
@@ -420,7 +420,7 @@ public class Roster implements Cacheable, Externalizable {
...
@@ -420,7 +420,7 @@ public class Roster implements Cacheable, Externalizable {
// broadcast roster update
// broadcast roster update
// Do not push items with a state of "None + Pending In"
// Do not push items with a state of "None + Pending In"
if
(
item
.
getSubStatus
()
!=
RosterItem
.
SUB_NONE
||
if
(
item
.
getSubStatus
()
!=
RosterItem
.
SUB_NONE
||
item
.
getRecvStatus
()
!=
RosterItem
.
RECV_SUBSCRIBE
)
{
item
.
getRecvStatus
()
!=
RosterItem
.
RECV_SUBSCRIBE
&&
!
isSubscriptionRejected
(
item
)
)
{
broadcast
(
item
,
true
);
broadcast
(
item
,
true
);
}
}
/*if (item.getSubStatus() == RosterItem.SUB_BOTH || item.getSubStatus() == RosterItem.SUB_TO) {
/*if (item.getSubStatus() == RosterItem.SUB_BOTH || item.getSubStatus() == RosterItem.SUB_TO) {
...
@@ -430,6 +430,18 @@ public class Roster implements Cacheable, Externalizable {
...
@@ -430,6 +430,18 @@ public class Roster implements Cacheable, Externalizable {
RosterEventDispatcher
.
contactUpdated
(
this
,
item
);
RosterEventDispatcher
.
contactUpdated
(
this
,
item
);
}
}
/**
* Returns true if roster item represents a rejected subscription request.
*
* @param item The roster item.
* @return True, if the roster item represents a rejected subscription request.
*/
private
static
boolean
isSubscriptionRejected
(
RosterItem
item
)
{
return
item
.
getSubStatus
()
==
RosterItem
.
SUB_NONE
&&
item
.
getRecvStatus
()
==
RosterItem
.
RECV_NONE
&&
item
.
getAskStatus
()
==
RosterItem
.
AskType
.
NONE
;
}
/**
/**
* Remove a user from the roster.
* Remove a user from the roster.
*
*
...
@@ -553,7 +565,7 @@ public class Roster implements Cacheable, Externalizable {
...
@@ -553,7 +565,7 @@ public class Roster implements Cacheable, Externalizable {
}
}
// Do not push items with a state of "None + Pending In"
// Do not push items with a state of "None + Pending In"
if
(
item
.
getSubStatus
()
!=
RosterItem
.
SUB_NONE
||
if
(
item
.
getSubStatus
()
!=
RosterItem
.
SUB_NONE
||
item
.
getRecvStatus
()
!=
RosterItem
.
RECV_SUBSCRIBE
)
{
item
.
getRecvStatus
()
!=
RosterItem
.
RECV_SUBSCRIBE
&&
!
isSubscriptionRejected
(
item
)
)
{
roster
.
addItem
(
item
.
getJid
(),
item
.
getNickname
(),
ask
,
sub
,
groups
);
roster
.
addItem
(
item
.
getJid
(),
item
.
getNickname
(),
ask
,
sub
,
groups
);
}
}
}
}
...
...
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