1 local verse = require "verse"; |
1 local verse = require "verse"; |
2 |
2 |
3 -- local xmlns_vcard = "vcard-temp"; |
3 -- local xmlns_vcard = "vcard-temp"; |
4 local xmlns_vcard_update = "vcard-temp:x:update"; |
4 local xmlns_vcard_update = "vcard-temp:x:update"; |
5 |
5 |
6 local sha1 = require("util.hashes").sha1; |
6 local sha1 = require("prosody.util.hashes").sha1; |
7 |
7 |
8 local ok, fun = pcall(function() |
8 local ok, fun = pcall(function() |
9 local unb64 = require("util.encodings").base64.decode; |
9 local unb64 = require("prosody.util.encodings").base64.decode; |
10 assert(unb64("SGVsbG8=") == "Hello") |
10 assert(unb64("SGVsbG8=") == "Hello") |
11 return unb64; |
11 return unb64; |
12 end); |
12 end); |
13 if not ok then |
13 if not ok then |
14 ok, fun = pcall(function() return require("mime").unb64; end); |
14 ok, fun = pcall(function() return require("mime").unb64; end); |