Software /
code /
prosody
Changeset
8784:64b78e3deb96
mod_muc_mam: Skip fetching history if no history was requested
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 28 Apr 2018 00:45:09 +0200 |
parents | 8783:79133eca0656 |
children | 8785:82b889608503 |
files | plugins/mod_muc_mam.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_muc_mam.lua Sat Apr 28 00:44:28 2018 +0200 +++ b/plugins/mod_muc_mam.lua Sat Apr 28 00:45:09 2018 +0200 @@ -246,6 +246,10 @@ local since = event.since; local to = event.to; + if maxstanzas == 0 or maxchars == 0 then + return -- No history requested + end + if not maxstanzas or maxstanzas > get_historylength(room) then maxstanzas = get_historylength(room); end