aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_roster.lua
diff options
context:
space:
mode:
authorJonas Schäfer <jonas@wielicki.name>2024-11-16 09:12:11 +0100
committerJonas Schäfer <jonas@wielicki.name>2024-11-16 09:12:11 +0100
commit9f53fd30a9647f63209273a39c384e3e6807ecce (patch)
tree13584138657dbc319e417eff2aac17b05512396b /plugins/mod_roster.lua
parent4bf9c26a2669b795ab33a22888914e8f72b8fa19 (diff)
downloadprosody-9f53fd30a9647f63209273a39c384e3e6807ecce.tar.gz
prosody-9f53fd30a9647f63209273a39c384e3e6807ecce.zip
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.
Diffstat (limited to 'plugins/mod_roster.lua')
-rw-r--r--plugins/mod_roster.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_roster.lua b/plugins/mod_roster.lua
index 53b404f7..82016d27 100644
--- a/plugins/mod_roster.lua
+++ b/plugins/mod_roster.lua
@@ -56,7 +56,7 @@ module:hook("iq/self/jabber:iq:roster:query", function(event)
roster:up(); -- move out from item
end
end
- roster.tags[1].attr.ver = server_ver;
+ roster.tags[1].attr.ver = tostring(server_ver);
end
session.send(roster);
session.interested = true; -- resource is interested in roster updates