1- const { v4 : uuid4 } = require ( 'uuid ' ) ;
1+ const { generateUUIDv4 : uuidv4 } = require ( '../../../src/utils ' ) ;
22const utils = require ( '../utils' ) ;
33
4- const johnID = `john-${ uuid4 ( ) } ` ;
4+ const johnID = `john-${ uuidv4 ( ) } ` ;
55
66async function keystroke ( ) {
77 const authClient = await utils . getTestClientForUser ( johnID , { } ) ;
8- const channel = authClient . channel ( 'messaging' , `poppins-${ uuid4 ( ) } ` ) ;
8+ const channel = authClient . channel ( 'messaging' , `poppins-${ uuidv4 ( ) } ` ) ;
99 await channel . watch ( ) ;
1010
1111 return await channel . keystroke ( ) ;
1212}
1313
1414async function sendMessageReadEvent ( ) {
1515 const authClient = await utils . getTestClientForUser ( johnID , { } ) ;
16- const channel = authClient . channel ( 'messaging' , `poppins-${ uuid4 ( ) } ` ) ;
16+ const channel = authClient . channel ( 'messaging' , `poppins-${ uuidv4 ( ) } ` ) ;
1717 await channel . watch ( ) ;
1818 const event = {
1919 type : 'message.read' ,
@@ -24,7 +24,7 @@ async function sendMessageReadEvent() {
2424
2525async function stopTyping ( ) {
2626 const authClient = await utils . getTestClientForUser ( johnID , { } ) ;
27- const channel = authClient . channel ( 'messaging' , `poppins-${ uuid4 ( ) } ` ) ;
27+ const channel = authClient . channel ( 'messaging' , `poppins-${ uuidv4 ( ) } ` ) ;
2828 await channel . watch ( ) ;
2929
3030 return await channel . stopTyping ( ) ;
0 commit comments