Software /
code /
verse
Diff
libs/adhoc.lib.lua @ 457:73d4eb93657b
Update to use util.id for random ids instead of counters (thanks Zash)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 16 Mar 2023 11:41:52 +0000 |
parent | 383:72be3c2cf602 |
child | 490:6b2f31da9610 |
line wrap: on
line diff
--- a/libs/adhoc.lib.lua Fri Mar 03 12:10:54 2023 +0000 +++ b/libs/adhoc.lib.lua Thu Mar 16 11:41:52 2023 +0000 @@ -4,7 +4,7 @@ -- COPYING file in the source package for more information. -- -local st, uuid = require "util.stanza", require "util.uuid"; +local st, new_id = require "util.stanza", require "util.id".short; local xmlns_cmd = "http://jabber.org/protocol/commands"; @@ -25,7 +25,7 @@ end function _M.handle_cmd(command, origin, stanza) - local sessionid = stanza.tags[1].attr.sessionid or uuid.generate(); + local sessionid = stanza.tags[1].attr.sessionid or new_id(); local dataIn = {}; dataIn.to = stanza.attr.to; dataIn.from = stanza.attr.from;