fix reaction in public

This commit is contained in:
PhilReact 2024-12-28 20:36:51 +02:00
parent 8dbf4302d8
commit 3416ef9bca

View File

@ -244,7 +244,7 @@ const [messageSize, setMessageSize] = useState(0)
const content = item?.content || item.decryptedData?.content;
const sender = item.sender;
const newTimestamp = item.timestamp;
const contentState = item?.contentState || item.decryptedData?.contentState;
const contentState = item?.contentState !== undefined ? item?.contentState : item.decryptedData?.contentState;
if (!content || typeof content !== "string" || !sender || typeof sender !== "string" || !newTimestamp) {
console.warn("Invalid content, sender, or timestamp in reaction data", item);
@ -336,7 +336,7 @@ const [messageSize, setMessageSize] = useState(0)
const content = item?.content || item.decryptedData?.content;
const sender = item.sender;
const newTimestamp = item.timestamp;
const contentState = item?.contentState || item.decryptedData?.contentState;
const contentState = item?.contentState !== undefined ? item?.contentState : item.decryptedData?.contentState;
if (!content || typeof content !== "string" || !sender || typeof sender !== "string" || !newTimestamp) {
console.warn("Invalid content, sender, or timestamp in reaction data", item);
@ -771,7 +771,7 @@ const clearEditorContent = () => {
setIsSending(false)
resumeAllQueues()
}
}, [])
}, [isPrivate])
const openQManager = useCallback(()=> {
setIsOpenQManager(true)