spec/scansion/mam_prefs_prep.scs
author Kim Alvefur <zash@zash.se>
Fri, 27 May 2022 14:45:35 +0200
branch0.12
changeset 12530 252ed01896dd
parent 11731 f3aee8a825cc
permissions -rw-r--r--
mod_smacks: Bounce unhandled stanzas from local origin (fix #1759) Sending stanzas with a remote session as origin when the stanzas have a local JID in the from attribute trips validation in core.stanza_router, leading to warnings: > Received a stanza claiming to be from remote.example, over a stream authed for localhost.example Using module:send() uses the local host as origin, which is fine here.

# mod_mam should 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