annotate mod_compat_dialback/mod_compat_dialback.lua @ 4565:3b2ae854842c

mod_muc_bot: Save occupant to room This has some side-effects: Firstly, the bot shows up in occupant list, which is nice. Secondly, the bot starts receiving messages from the room which might be wanted, but it would be better to join the room for real in this case.
author Kim Alvefur <zash@zash.se>
date Sat, 10 Apr 2021 19:23:25 +0200
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);