# HG changeset patch # User Kim Alvefur # Date 1557084675 -7200 # Node ID e057e8318130929909603330f9ca0bd83bb7cfc7 # Parent 4d702f0c6273ed8bd908c1dfd94a345def7847bb migrator: Add support for archives (fixes #651) diff -r 4d702f0c6273 -r e057e8318130 tools/migration/prosody-migrator.lua --- a/tools/migration/prosody-migrator.lua Sun May 05 21:32:34 2019 +0200 +++ b/tools/migration/prosody-migrator.lua Sun May 05 21:31:15 2019 +0200 @@ -174,6 +174,12 @@ local data, err = origin:get(user); assert(not err, err); assert(destination:set(user, data)); + elseif typ == "archive" then + local iter, err = origin:find(user); + assert(iter, err); + for id, item, when, with in iter do + assert(destination:append(user, id, item, when, with)); + end else error("Don't know how to migrate data of type '"..typ.."'."); end