Diff

plugins/jingle_ibb.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 428:bde804b01f28
child 469:b49d5df43a4c
line wrap: on
line diff
--- a/plugins/jingle_ibb.lua	Fri Mar 03 12:10:54 2023 +0000
+++ b/plugins/jingle_ibb.lua	Thu Mar 16 11:41:52 2023 +0000
@@ -1,6 +1,6 @@
 local verse = require "verse";
 local base64 = require "util.encodings".base64;
-local uuid_generate = require "util.uuid".generate;
+local new_id = require "util.id".short;
 
 local xmlns_jingle_ibb = "urn:xmpp:jingle:transports:ibb:1";
 local xmlns_ibb = "http://jabber.org/protocol/ibb";
@@ -159,7 +159,7 @@
 	end
 	function ibb:generate_initiate()
 		print("ibb:generate_initiate() as ".. self.role);
-		local sid = uuid_generate();
+		local sid = new_id();
 		self.sid = sid;
 		self.stanza = 'iq';
 		self.block = 2048;