Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
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
src/xmpp/biboumi_component.cpp
View file @
0142e5c3
...
...
@@ -627,6 +627,11 @@ bool BiboumiComponent::handle_mam_request(const Stanza& stanza)
if
(
max
)
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
);
for
(
const
db
::
MucLogLine
&
line
:
lines
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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