Software /
code /
verse
Comparison
plugins/vcard_update.lua @ 490:6b2f31da9610
Update for new Prosody module namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 20 May 2023 20:48:03 +0200 |
parent | 395:e86144a4eaa1 |
comparison
equal
deleted
inserted
replaced
489:39ed19f12dca | 490:6b2f31da9610 |
---|---|
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); |