mod_auth_anonymous: Attach a fake roster to the session, so the null storage backend...
[prosody.git] / plugins / mod_auth_anonymous.lua
index c080177d5fb4ebfeac62044224de0133bb6338f5..3cb7cf98b2cbb9bc8d8fdd3a806a3486bcffbddc 100644 (file)
@@ -32,9 +32,10 @@ function new_default_provider(host)
                return nil, "Account creation/modification not supported.";
        end
 
-       function provider.get_sasl_handler()
+       function provider.get_sasl_handler(session)
                local anonymous_authentication_profile = {
                        anonymous = function(sasl, username, realm)
+                               session.roster = {}; -- so that the null storage backend doesn't upset rostermanager
                                return true; -- for normal usage you should always return true here
                        end
                };