annotate mod_compat_dialback/mod_compat_dialback.lua @ 3375:6317a5d8ce2d

mod_muc_cloud_notify: README updates
author JC Brand <jc@opkode.com>
date Sat, 17 Nov 2018 14:27:00 +0000
parents 56f6a642fc67
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1900
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 -- Prosody IM
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2 -- Copyright (C) 2008-2010 Matthew Wild
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 -- Copyright (C) 2008-2010 Waqas Hussain
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 --
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 -- This project is MIT/X11 licensed. Please see the
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 -- COPYING file in the source package for more information.
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 --
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 module:set_global();
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10
1916
56f6a642fc67 mod_compat_dialback: Use correct API for hooking events (Thanks sol, Lance)
Kim Alvefur <zash@zash.se>
parents: 1900
diff changeset
11 module:hook("s2s-stream-features-legacy", function (data)
1900
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 if data.origin.type == "s2sin_unauthed" then
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 data.features:tag("dialback", { xmlns='urn:xmpp:features:dialback' }):up();
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 end
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 end);