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
74203ec8
Commit
74203ec8
authored
Mar 09, 2015
by
Christian Schudt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Openfire should return "msgoffline" in disco requests (as per XEP-0160)
parent
8df2958e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
OfflineMessageStrategy.java
...ava/org/jivesoftware/openfire/OfflineMessageStrategy.java
+16
-1
No files found.
src/java/org/jivesoftware/openfire/OfflineMessageStrategy.java
View file @
74203ec8
...
@@ -20,10 +20,13 @@
...
@@ -20,10 +20,13 @@
package
org
.
jivesoftware
.
openfire
;
package
org
.
jivesoftware
.
openfire
;
import
java.util.Collections
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.CopyOnWriteArrayList
;
import
java.util.concurrent.CopyOnWriteArrayList
;
import
org.jivesoftware.openfire.container.BasicModule
;
import
org.jivesoftware.openfire.container.BasicModule
;
import
org.jivesoftware.openfire.disco.ServerFeaturesProvider
;
import
org.jivesoftware.openfire.privacy.PrivacyList
;
import
org.jivesoftware.openfire.privacy.PrivacyList
;
import
org.jivesoftware.openfire.privacy.PrivacyListManager
;
import
org.jivesoftware.openfire.privacy.PrivacyListManager
;
import
org.jivesoftware.openfire.user.UserManager
;
import
org.jivesoftware.openfire.user.UserManager
;
...
@@ -40,7 +43,7 @@ import org.xmpp.packet.PacketExtension;
...
@@ -40,7 +43,7 @@ import org.xmpp.packet.PacketExtension;
*
*
* @author Iain Shigeoka
* @author Iain Shigeoka
*/
*/
public
class
OfflineMessageStrategy
extends
BasicModule
{
public
class
OfflineMessageStrategy
extends
BasicModule
implements
ServerFeaturesProvider
{
private
static
final
Logger
Log
=
LoggerFactory
.
getLogger
(
OfflineMessageStrategy
.
class
);
private
static
final
Logger
Log
=
LoggerFactory
.
getLogger
(
OfflineMessageStrategy
.
class
);
...
@@ -241,6 +244,18 @@ public class OfflineMessageStrategy extends BasicModule {
...
@@ -241,6 +244,18 @@ public class OfflineMessageStrategy extends BasicModule {
}
}
}
}
@Override
public
Iterator
<
String
>
getFeatures
()
{
switch
(
type
)
{
case
store:
case
store_and_bounce:
case
store_and_drop:
// http://xmpp.org/extensions/xep-0160.html#disco
return
Collections
.
singleton
(
"msgoffline"
).
iterator
();
}
return
Collections
.<
String
>
emptyList
().
iterator
();
}
/**
/**
* Strategy types.
* Strategy types.
*/
*/
...
...
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