# HG changeset patch # User Kim Alvefur <zash@zash.se> # Date 1545574969 -3600 # Node ID 4f6413ec08a853429105d666cb5ee18b5fadbeb7 # Parent d41ce505cdf92ab953953b17cacc325b43b56c61 mod_mam: Add test for JID normalization in prefs (see #1275) diff -r d41ce505cdf9 -r 4f6413ec08a8 spec/scansion/mam_prefs_prep.scs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/spec/scansion/mam_prefs_prep.scs Sun Dec 23 15:22:49 2018 +0100 @@ -0,0 +1,36 @@ +# mod_mam shold apply JIDprep in prefs + +[Client] Romeo + jid: romeo@localhost + password: password + +----- + +Romeo connects + +Romeo sends: + <iq id="lx2" type="set"> + <prefs xmlns="urn:xmpp:mam:2" default="roster"> + <always> + <jid>JULIET@MONTAGUE.LIT</jid> + </always> + <never> + <jid>MONTAGUE@MONTAGUE.LIT</jid> + </never> + </prefs> + </iq> + +Romeo receives: + <iq id="lx2" type="result"> + <prefs xmlns="urn:xmpp:mam:2" default="roster"> + <always> + <jid>juliet@montague.lit</jid> + </always> + <never> + <jid>montague@montague.lit</jid> + </never> + </prefs> + </iq> + +Romeo disconnects + diff -r d41ce505cdf9 -r 4f6413ec08a8 spec/scansion/prosody.cfg.lua --- a/spec/scansion/prosody.cfg.lua Sun Dec 23 15:25:01 2018 +0100 +++ b/spec/scansion/prosody.cfg.lua Sun Dec 23 15:22:49 2018 +0100 @@ -25,7 +25,7 @@ "time"; -- Let others know the time here on this server "ping"; -- Replies to XMPP pings with pongs "register"; -- Allow users to register on this server using a client and change passwords - --"mam"; -- Store messages in an archive and allow users to access it + "mam"; -- Store messages in an archive and allow users to access it -- HTTP modules --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP" @@ -59,6 +59,7 @@ storage = "memory" +mam_smart_enable = true -- For the "sql" backend, you can uncomment *one* of the below to configure: --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.