From 1c2e2c4b06b088ad0d4d752760b3126a6a9bf017 Mon Sep 17 00:00:00 2001
From: Johann150 <johann.galle@protonmail.com>
Date: Fri, 24 Jun 2022 12:03:41 +0200
Subject: [PATCH] fix(client): ask to log in for poll vote (#8883)

---
 packages/client/src/components/poll.vue | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/packages/client/src/components/poll.vue b/packages/client/src/components/poll.vue
index 171b4a477..d9ef5970c 100644
--- a/packages/client/src/components/poll.vue
+++ b/packages/client/src/components/poll.vue
@@ -24,6 +24,7 @@
 <script lang="ts">
 import { computed, defineComponent, onUnmounted, ref, toRef } from 'vue';
 import { sum } from '@/scripts/array';
+import { pleaseLogin } from '@/scripts/please-login';
 import * as os from '@/os';
 import { i18n } from '@/i18n';
 
@@ -75,6 +76,8 @@ export default defineComponent({
 		}
 
 		const vote = async (id) => {
+			pleaseLogin();
+
 			if (props.readOnly || closed.value || isVoted.value) return;
 
 			const { canceled } = await os.confirm({