Mercurial > prosody-hg
comparison plugins/mod_groups.lua @ 2912:f5a5317f3485
mod_groups: Fixes to make compatible with roster versioning - set version to 'true' to indicate that the roster is not being versioned
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 22 Mar 2010 14:35:02 +0000 |
| parents | 30895e419e92 |
| children | 3d4e814cadfa |
comparison
equal
deleted
inserted
replaced
| 2911:30895e419e92 | 2912:f5a5317f3485 |
|---|---|
| 51 for _, group_name in ipairs(members[false]) do | 51 for _, group_name in ipairs(members[false]) do |
| 52 module:log("debug", "Importing group %s", group_name); | 52 module:log("debug", "Importing group %s", group_name); |
| 53 import_jids_to_roster(group_name); | 53 import_jids_to_roster(group_name); |
| 54 end | 54 end |
| 55 end | 55 end |
| 56 | |
| 57 if roster[false] then | |
| 58 roster[false].version = true; | |
| 59 end | |
| 56 end | 60 end |
| 57 | 61 |
| 58 function remove_virtual_contacts(username, host, datastore, data) | 62 function remove_virtual_contacts(username, host, datastore, data) |
| 59 if host == module_host and datastore == "roster" then | 63 if host == module_host and datastore == "roster" then |
| 60 local new_roster = {}; | 64 local new_roster = {}; |
| 61 for jid, contact in pairs(data) do | 65 for jid, contact in pairs(data) do |
| 62 if contact.persist ~= false then | 66 if contact.persist ~= false then |
| 63 new_roster[jid] = contact; | 67 new_roster[jid] = contact; |
| 64 end | 68 end |
| 65 end | 69 end |
| 70 new_roster[false].version = nil; -- Version is void | |
| 66 return username, host, datastore, new_roster; | 71 return username, host, datastore, new_roster; |
| 67 end | 72 end |
| 68 | 73 |
| 69 return username, host, datastore, data; | 74 return username, host, datastore, data; |
| 70 end | 75 end |
