From 928c8e544f2c6e6d470340b720445b7fd26ccc63 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 17 Aug 2023 14:19:20 +0300 Subject: [PATCH] Better random Ids for tags --- public/scripts/tags.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/scripts/tags.js b/public/scripts/tags.js index 512746c76..56e509f4f 100644 --- a/public/scripts/tags.js +++ b/public/scripts/tags.js @@ -10,6 +10,7 @@ import { } from "../script.js"; import { selected_group } from "./group-chats.js"; +import { uuidv4 } from "./utils.js"; export { tags, @@ -24,7 +25,7 @@ export { importTags, }; -const random_id = () => Math.round(Date.now() * Math.random()).toString(); +const random_id = () => uuidv4(); const TAG_LOGIC_AND = true; // switch to false to use OR logic for combining tags const CHARACTER_SELECTOR = '#rm_print_characters_block > div'; const GROUP_MEMBER_SELECTOR = '#rm_group_add_members > div';