fix: 🐛 Don't auto mention yourself when replying/quoting yourself

This commit is contained in:
Jesse Wierzbinski 2024-04-27 21:54:13 -10:00
parent 86e254b7e7
commit a2a2149776
No known key found for this signature in database
5 changed files with 31 additions and 10 deletions

View file

@ -40,19 +40,22 @@ const { input: content } = useTextareaAutosize({
const { Control_Enter, Command_Enter } = useMagicKeys();
const respondingTo = ref<Status | null>(null);
const respondingType = ref<"reply" | "quote" | null>(null);
const me = useMe();
onMounted(() => {
useListen("composer:reply", (note: Status) => {
respondingTo.value = note;
respondingType.value = "reply";
content.value = `@${note.account.acct} `;
if (note.account.id !== me.value?.id)
content.value = `@${note.account.acct} `;
textarea.value?.focus();
});
useListen("composer:quote", (note: Status) => {
respondingTo.value = note;
respondingType.value = "quote";
content.value = `@${note.account.acct} `;
if (note.account.id !== me.value?.id)
content.value = `@${note.account.acct} `;
textarea.value?.focus();
});
});