Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Romain DEP.
biboumi
Commits
0142e5c3
Commit
0142e5c3
authored
Apr 12, 2017
by
louiz’
Browse files
Limit of 200 MAM messages, if no other limit has been set by the client
fix #3256
parent
dc5ad49b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/xmpp/biboumi_component.cpp
src/xmpp/biboumi_component.cpp
+5
-0
No files found.
src/xmpp/biboumi_component.cpp
View file @
0142e5c3
...
@@ -627,6 +627,11 @@ bool BiboumiComponent::handle_mam_request(const Stanza& stanza)
...
@@ -627,6 +627,11 @@ bool BiboumiComponent::handle_mam_request(const Stanza& stanza)
if
(
max
)
if
(
max
)
limit
=
std
::
atoi
(
max
->
get_inner
().
data
());
limit
=
std
::
atoi
(
max
->
get_inner
().
data
());
}
}
// If the archive is really big, and the client didn’t specify any
// limit, we avoid flooding it: we set an arbitrary max limit.
if
(
limit
==
-
1
&&
start
.
empty
()
&&
end
.
empty
())
{
limit
=
100
;
}
const
auto
lines
=
Database
::
get_muc_logs
(
from
.
bare
(),
iid
.
get_local
(),
iid
.
get_server
(),
limit
,
start
,
end
);
const
auto
lines
=
Database
::
get_muc_logs
(
from
.
bare
(),
iid
.
get_local
(),
iid
.
get_server
(),
limit
,
start
,
end
);
for
(
const
db
::
MucLogLine
&
line
:
lines
)
for
(
const
db
::
MucLogLine
&
line
:
lines
)
{
{
...
...
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