mod_vcard: Fixed traceback on attempt to set vcards by non-c2s sessions.
authorWaqas Hussain <waqas20@gmail.com>
Sun, 18 Oct 2009 01:55:00 +0000 (06:55 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Sun, 18 Oct 2009 01:55:00 +0000 (06:55 +0500)
plugins/mod_vcard.lua

index e2016c97a4b871891fc8cede95e015f645aeec91..c84095e8c2f7477549484dcde5d105e88847e2d7 100644 (file)
@@ -40,7 +40,7 @@ function handle_vcard(session, stanza)
                                session.send(st.error_reply(stanza, "cancel", "item-not-found"));
                        end
                elseif stanza.attr.type == "set" then
-                       if not to or to == session.username.."@"..session.host then
+                       if not to then
                                if datamanager.store(session.username, session.host, "vcard", st.preserialize(stanza.tags[1])) then
                                        session.send(st.reply(stanza));
                                else