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
45fa9970
Commit
45fa9970
authored
Jan 19, 2015
by
linuschien
Committed by
Guus der Kinderen
Dec 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https://igniterealtime.org/issues/browse/OF-856
parent
64b3af11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
IQRetrieveHandler.java
...on/openfire/plugin/archive/xep0136/IQRetrieveHandler.java
+14
-5
No files found.
src/plugins/monitoring/src/java/com/reucon/openfire/plugin/archive/xep0136/IQRetrieveHandler.java
View file @
45fa9970
...
...
@@ -75,8 +75,12 @@ public class IQRetrieveHandler extends AbstractIQHandler {
final
List
<
ArchivedMessage
>
messages
=
conversation
.
getMessages
()
.
subList
(
fromIndex
,
toIndex
);
for
(
ArchivedMessage
message
:
messages
)
{
addMessageElement
(
chatElement
,
conversation
,
message
);
for
(
int
i
=
0
;
i
<
messages
.
size
();
i
++)
{
if
(
i
==
0
)
{
addMessageElement
(
chatElement
,
conversation
,
messages
.
get
(
i
),
null
);
}
else
{
addMessageElement
(
chatElement
,
conversation
,
messages
.
get
(
i
),
messages
.
get
(
i
-
1
));
}
}
if
(
resultSet
!=
null
)
{
...
...
@@ -98,11 +102,16 @@ public class IQRetrieveHandler extends AbstractIQHandler {
}
private
Element
addMessageElement
(
Element
parentElement
,
Conversation
conversation
,
ArchivedMessage
message
)
{
Conversation
conversation
,
ArchivedMessage
message
,
ArchivedMessage
previousMessage
)
{
final
Element
messageElement
;
final
long
secs
;
secs
=
(
message
.
getTime
().
getTime
()
-
conversation
.
getStart
().
getTime
())
/
1000
;
if
(
previousMessage
==
null
)
{
secs
=
(
message
.
getTime
().
getTime
()
-
conversation
.
getStart
().
getTime
())
/
1000
;
}
else
{
secs
=
(
message
.
getTime
().
getTime
()
-
previousMessage
.
getTime
().
getTime
())
/
1000
;
}
messageElement
=
parentElement
.
addElement
(
message
.
getDirection
()
.
toString
());
messageElement
.
addAttribute
(
"secs"
,
Long
.
toString
(
secs
));
...
...
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