Mercurial > prosody-modules
comparison mod_mam/rsm.lib.lua @ 1101:479df3e0b012
mod_mam/rsm.lib: Fix serialization of before = true
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 08 Jul 2013 12:19:53 +0200 |
| parents | 57206f8f7b09 |
| children | bfde5e5318d7 |
comparison
equal
deleted
inserted
replaced
| 1100:aa93cf0b1242 | 1101:479df3e0b012 |
|---|---|
| 37 st:tag("first", { index = data.index }):text(data[1]):up(); | 37 st:tag("first", { index = data.index }):text(data[1]):up(); |
| 38 else | 38 else |
| 39 st:tag("first"):text(tostring(data)):up(); | 39 st:tag("first"):text(tostring(data)):up(); |
| 40 end | 40 end |
| 41 end; | 41 end; |
| 42 before = function(st, data) | |
| 43 if data == true then | |
| 44 st:tag("before"):up(); | |
| 45 else | |
| 46 st:tag("before"):text(tostring(data)):up(); | |
| 47 end | |
| 48 end | |
| 42 }, { | 49 }, { |
| 43 __index = function(_, name) | 50 __index = function(_, name) |
| 44 return function(st, data) | 51 return function(st, data) |
| 45 st:tag(name):text(tostring(data)):up(); | 52 st:tag(name):text(tostring(data)):up(); |
| 46 end | 53 end |
