Mercurial > prosody-modules
comparison mod_rest/jsonmap.lib.lua @ 4954:e8a487c42b36
merge upstream
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 28 May 2022 16:43:04 +0200 |
parents | b171ddf1bc3e |
children | 048e339706ba |
comparison
equal
deleted
inserted
replaced
4939:7d6ae8bb95dc | 4954:e8a487c42b36 |
---|---|
504 -- XEP-0313 conveninece mapping | 504 -- XEP-0313 conveninece mapping |
505 if kind == "iq" and t_type == "set" and type(t.archive) == "table" and not t.archive.form then | 505 if kind == "iq" and t_type == "set" and type(t.archive) == "table" and not t.archive.form then |
506 local archive = t.archive; | 506 local archive = t.archive; |
507 if archive["with"] or archive["start"] or archive["end"] or archive["before-id"] or archive["after-id"] | 507 if archive["with"] or archive["start"] or archive["end"] or archive["before-id"] or archive["after-id"] |
508 or archive["ids"] then | 508 or archive["ids"] then |
509 if type(archive["ids"]) == "string" then | |
510 local ids = {}; | |
511 for id in archive["ids"]:gmatch("[^,]+") do | |
512 table.insert(ids, id); | |
513 end | |
514 archive["ids"] = ids; | |
515 end | |
509 archive.form = { | 516 archive.form = { |
510 type = "submit"; | 517 type = "submit"; |
511 fields = { | 518 fields = { |
512 { var = "FORM_TYPE"; values = { "urn:xmpp:mam:2" } }; | 519 { var = "FORM_TYPE"; values = { "urn:xmpp:mam:2" } }; |
513 { var = "with"; values = { archive["with"] } }; | 520 { var = "with"; values = { archive["with"] } }; |