Mercurial > prosody-hg
comparison plugins/mod_storage_xep0227.lua @ 6704:03afecdf2e3c
mod_storage_xep0227: Silence luacheck warnings
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 15 May 2015 15:32:39 +0200 |
| parents | 353a7d4dfdc2 |
| children | 3ca11d408382 |
comparison
equal
deleted
inserted
replaced
| 6703:353a7d4dfdc2 | 6704:03afecdf2e3c |
|---|---|
| 69 -- In order to support mod_auth_internal_hashed | 69 -- In order to support mod_auth_internal_hashed |
| 70 local extended = "http://prosody.im/protocol/extended-xep0227\1"; | 70 local extended = "http://prosody.im/protocol/extended-xep0227\1"; |
| 71 | 71 |
| 72 handlers.accounts = { | 72 handlers.accounts = { |
| 73 get = function(self, user) | 73 get = function(self, user) |
| 74 local user = getUserElement(getXml(user, self.host)); | 74 user = getUserElement(getXml(user, self.host)); |
| 75 if user and user.attr.password then | 75 if user and user.attr.password then |
| 76 return { password = user.attr.password }; | 76 return { password = user.attr.password }; |
| 77 elseif user then | 77 elseif user then |
| 78 local data = {}; | 78 local data = {}; |
| 79 for k, v in pairs(user.attr) do | 79 for k, v in pairs(user.attr) do |
| 102 end | 102 end |
| 103 end; | 103 end; |
| 104 }; | 104 }; |
| 105 handlers.vcard = { | 105 handlers.vcard = { |
| 106 get = function(self, user) | 106 get = function(self, user) |
| 107 local user = getUserElement(getXml(user, self.host)); | 107 user = getUserElement(getXml(user, self.host)); |
| 108 if user then | 108 if user then |
| 109 local vcard = user:get_child("vCard", 'vcard-temp'); | 109 local vcard = user:get_child("vCard", 'vcard-temp'); |
| 110 if vcard then | 110 if vcard then |
| 111 return st.preserialize(vcard); | 111 return st.preserialize(vcard); |
| 112 end | 112 end |
| 131 return true; | 131 return true; |
| 132 end; | 132 end; |
| 133 }; | 133 }; |
| 134 handlers.private = { | 134 handlers.private = { |
| 135 get = function(self, user) | 135 get = function(self, user) |
| 136 local user = getUserElement(getXml(user, self.host)); | 136 user = getUserElement(getXml(user, self.host)); |
| 137 if user then | 137 if user then |
| 138 local private = user:get_child("query", "jabber:iq:private"); | 138 local private = user:get_child("query", "jabber:iq:private"); |
| 139 if private then | 139 if private then |
| 140 local r = {}; | 140 local r = {}; |
| 141 for _, tag in ipairs(private.tags) do | 141 for _, tag in ipairs(private.tags) do |
