From efcf8a6ae59d9767bc2289af927a2e12bc39a054 Mon Sep 17 00:00:00 2001
From: dan <dan.abramov@gmail.com>
Date: Tue, 8 Oct 2024 14:46:15 +0900
Subject: Nicer error message for disabled quotes (#5644)

---
 src/view/com/composer/Composer.tsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/view/com/composer/Composer.tsx')

diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx
index 87f72ce42..55c2d81ab 100644
--- a/src/view/com/composer/Composer.tsx
+++ b/src/view/com/composer/Composer.tsx
@@ -48,6 +48,7 @@ import {useLingui} from '@lingui/react'
 import {useQueryClient} from '@tanstack/react-query'
 
 import * as apilib from '#/lib/api/index'
+import {EmbeddingDisabledError} from '#/lib/api/resolve'
 import {until} from '#/lib/async/until'
 import {MAX_GRAPHEME_LENGTH} from '#/lib/constants'
 import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED'
@@ -420,6 +421,8 @@ export const ComposePost = ({
           err = _(
             msg`We're sorry! The post you are replying to has been deleted.`,
           )
+        } else if (e instanceof EmbeddingDisabledError) {
+          err = _(msg`This post's author has disabled quote posts.`)
         }
         setError(err)
         setIsProcessing(false)
-- 
cgit 1.4.1

