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
f13ffc5b
Commit
f13ffc5b
authored
Jun 04, 2014
by
dwd
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #30 from Flowdalic/codecleanup
Codecleanup
parents
3a532cb2
ac7d473c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
OfflineMessageStrategy.java
...ava/org/jivesoftware/openfire/OfflineMessageStrategy.java
+15
-10
No files found.
src/java/org/jivesoftware/openfire/OfflineMessageStrategy.java
View file @
f13ffc5b
...
...
@@ -117,12 +117,12 @@ public class OfflineMessageStrategy extends BasicModule {
// For a message stanza of type "normal", "groupchat", or "headline", the server MUST either (a) silently ignore the stanza
// or (b) return an error stanza to the sender, which SHOULD be <service-unavailable/>.
if
(
message
.
getType
()
==
Message
.
Type
.
normal
||
message
.
getType
()
==
Message
.
Type
.
groupchat
||
message
.
getType
()
==
Message
.
Type
.
headline
)
{
// Depending on the OfflineMessageStragey, we may silently ignore or bounce
if
(
type
==
Type
.
bounce
)
{
bounce
(
message
);
return
;
}
else
{
return
;
}
// Either bounce or silently ignore, never store such messages
return
;
}
// For a message stanza of type "error", the server MUST silently ignore the stanza.
else
if
(
message
.
getType
()
==
Message
.
Type
.
error
)
{
...
...
@@ -130,24 +130,29 @@ public class OfflineMessageStrategy extends BasicModule {
}
}
if
(
type
==
Type
.
bounce
)
{
switch
(
type
)
{
case
bounce:
bounce
(
message
);
}
else
if
(
type
==
Type
.
store
)
{
break
;
case
store:
store
(
message
);
}
else
if
(
type
==
Type
.
store_and_bounce
)
{
break
;
case
store_and_bounce:
if
(
underQuota
(
message
))
{
store
(
message
);
}
else
{
bounce
(
message
);
}
}
else
if
(
type
==
Type
.
store_and_drop
)
{
break
;
case
store_and_drop:
if
(
underQuota
(
message
))
{
store
(
message
);
}
break
;
case
drop:
// Drop essentially means silently ignore/do nothing
break
;
}
}
}
...
...
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