Mercurial > prosody-hg
comparison plugins/mod_roster.lua @ 13566:2fb4ce131131
mod_roster: do not store number in attribute
Attributes are strings. That definitely is a number. So we
tostring() it. This is important when the API becomes stricter,
for whatever reason that might happen.
Practically, this moves the overhead of converting to a string
to a place where it is visible.
| author | Jonas Schäfer <jonas@wielicki.name> |
|---|---|
| date | Sat, 16 Nov 2024 09:12:11 +0100 |
| parents | 74b9e05af71e |
| children | 0f265142117a |
comparison
equal
deleted
inserted
replaced
| 13565:93304fd878b2 | 13566:2fb4ce131131 |
|---|---|
| 54 roster:text_tag("group", group); | 54 roster:text_tag("group", group); |
| 55 end | 55 end |
| 56 roster:up(); -- move out from item | 56 roster:up(); -- move out from item |
| 57 end | 57 end |
| 58 end | 58 end |
| 59 roster.tags[1].attr.ver = server_ver; | 59 roster.tags[1].attr.ver = tostring(server_ver); |
| 60 end | 60 end |
| 61 session.send(roster); | 61 session.send(roster); |
| 62 session.interested = true; -- resource is interested in roster updates | 62 session.interested = true; -- resource is interested in roster updates |
| 63 else -- stanza.attr.type == "set" | 63 else -- stanza.attr.type == "set" |
| 64 local query = stanza.tags[1]; | 64 local query = stanza.tags[1]; |
