From d6b72dcfa2a68367ce44ad1cb47c8695b0274a2f Mon Sep 17 00:00:00 2001 From: NoriDev Date: Thu, 18 May 2023 16:47:51 +0900 Subject: [PATCH] relieve throttle --- packages/frontend/src/pages/messaging/messaging-room.form.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/pages/messaging/messaging-room.form.vue b/packages/frontend/src/pages/messaging/messaging-room.form.vue index 58ff8bb267..b457974a69 100644 --- a/packages/frontend/src/pages/messaging/messaging-room.form.vue +++ b/packages/frontend/src/pages/messaging/messaging-room.form.vue @@ -56,9 +56,9 @@ let fileEl = $shallowRef(); let text = $ref(''); let file = $ref(null); let sending = $ref(false); -const typing = throttle(3000, () => { +const typing = () => { stream.send('typingOnMessaging', props.user ? { partner: props.user.id } : { group: props.group?.id }); -}); +}; let draftKey = $computed(() => props.user ? 'user:' + props.user.id : 'group:' + props.group?.id); let canSend = $computed(() => (text != null && text !== '') || file != null);