From c4b586804dcd2b18b26670c9460c9a27b275d5dc Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Thu, 9 Jan 2025 10:50:33 +0100 Subject: [PATCH 01/11] Cleanup channel catchup header; --- .../catchup/CommunityChannelCatchup.tsx | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/packages/apps/community-app/src/components/Community/catchup/CommunityChannelCatchup.tsx b/packages/apps/community-app/src/components/Community/catchup/CommunityChannelCatchup.tsx index d6bb9942a..81af90b1c 100644 --- a/packages/apps/community-app/src/components/Community/catchup/CommunityChannelCatchup.tsx +++ b/packages/apps/community-app/src/components/Community/catchup/CommunityChannelCatchup.tsx @@ -18,21 +18,16 @@ export const CommunityChannelCatchup = ({ return (
-
- - # {channel.fileMetadata.appData.content.title} - + + # {channel.fileMetadata.appData.content.title} + + - - {t('Open channel')} - - -
Date: Thu, 9 Jan 2025 10:50:43 +0100 Subject: [PATCH 02/11] Better searching for metions; --- .../components/Community/Message/composer/MessageComposer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/apps/community-app/src/components/Community/Message/composer/MessageComposer.tsx b/packages/apps/community-app/src/components/Community/Message/composer/MessageComposer.tsx index 81d0ec9ea..6f2979f2d 100644 --- a/packages/apps/community-app/src/components/Community/Message/composer/MessageComposer.tsx +++ b/packages/apps/community-app/src/components/Community/Message/composer/MessageComposer.tsx @@ -148,10 +148,10 @@ export const MessageComposer = ({ : undefined)); return { - key: `${content.odinId} (${name})`, + key: `${content.odinId}`, value: content.odinId, text: content.odinId, - label: `${content.odinId} (${name})`, + label: `${content.odinId} - ${name}`, }; }) .filter(Boolean) as Mentionable[]) || []; From 5bab2f5e841f98fa374b4a3c3f2a46b4eb045173 Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Thu, 9 Jan 2025 10:50:53 +0100 Subject: [PATCH 03/11] Fixed broken channel create option; --- .../src/components/plate-ui/inline-combobox.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/common/rich-text-editor/src/components/plate-ui/inline-combobox.tsx b/packages/common/rich-text-editor/src/components/plate-ui/inline-combobox.tsx index 61521f6c6..b1b849c06 100644 --- a/packages/common/rich-text-editor/src/components/plate-ui/inline-combobox.tsx +++ b/packages/common/rich-text-editor/src/components/plate-ui/inline-combobox.tsx @@ -347,7 +347,7 @@ const InlineComboboxEmpty = ({ children, className }: HTMLAttributes) => { const { setHasEmpty } = useContext(InlineComboboxContext); @@ -363,15 +363,16 @@ const InlineComboboxSeleactableEmpty = ({ }, [setHasEmpty]); if (items.length > 0) return null; - return (
- {children} -
+ onMouseDown={(e) => { + if (!onClick) return; + e.preventDefault(); + onClick(e); + }} + /> ); // const { removeInput, setHasEmpty } = useContext(InlineComboboxContext); From ef3314e6067eec7c27938d81a3dcb486d5e6b131 Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Thu, 9 Jan 2025 11:13:18 +0100 Subject: [PATCH 04/11] Fix broken/slow thread composer; --- .../Message/composer/MessageComposer.tsx | 3 +++ .../Community/catchup/CommunityThreadCatchup.tsx | 16 +++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/apps/community-app/src/components/Community/Message/composer/MessageComposer.tsx b/packages/apps/community-app/src/components/Community/Message/composer/MessageComposer.tsx index 6f2979f2d..d83bcaa1b 100644 --- a/packages/apps/community-app/src/components/Community/Message/composer/MessageComposer.tsx +++ b/packages/apps/community-app/src/components/Community/Message/composer/MessageComposer.tsx @@ -229,6 +229,9 @@ export const MessageComposer = ({ disableHeadings={true} mentionables={mentionables} plugins={plugins} + uniqueId={ + thread?.fileMetadata.globalTransitId || channel?.fileMetadata.appData.uniqueId + } >
diff --git a/packages/apps/community-app/src/components/Community/catchup/CommunityThreadCatchup.tsx b/packages/apps/community-app/src/components/Community/catchup/CommunityThreadCatchup.tsx index 5380dcb12..e39d5924c 100644 --- a/packages/apps/community-app/src/components/Community/catchup/CommunityThreadCatchup.tsx +++ b/packages/apps/community-app/src/components/Community/catchup/CommunityThreadCatchup.tsx @@ -11,7 +11,7 @@ import { import { useCommunityMessage } from '../../../hooks/community/messages/useCommunityMessage'; import { useCommunityChannel } from '../../../hooks/community/channels/useCommunityChannel'; import { ThreadMeta } from '../../../hooks/community/threads/useCommunityThreads'; -import React, { useState } from 'react'; +import React, { useMemo, useState } from 'react'; import { MessageComposer } from '../Message/composer/MessageComposer'; import { ExternalLink } from '@homebase-id/common-app/icons'; @@ -39,6 +39,15 @@ export const CommunityThreadCatchup = ({ fileSystemType: 'Standard', }).get; + const showOptions = useMemo(() => { + return { + count: 10, + targetLink: channel + ? `${COMMUNITY_ROOT_PATH}/${community.fileMetadata.senderOdinId}/${communityId}/${channel.fileMetadata.appData.uniqueId}/${threadMeta.threadId}/thread` + : '', + }; + }, [community, channel]); + if (!channel || !originMessage) return null; return ( @@ -82,10 +91,7 @@ export const CommunityThreadCatchup = ({ origin={originMessage} setParticipants={setParticipants} alignTop={true} - maxShowOptions={{ - count: 10, - targetLink: `${COMMUNITY_ROOT_PATH}/${community.fileMetadata.senderOdinId}/${communityId}/${channel.fileMetadata.appData.uniqueId}/${threadMeta.threadId}/thread`, - }} + maxShowOptions={showOptions} /> {originMessage ? ( From 655080686ff86d2dde28bdd593307bd80fe6097b Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Thu, 9 Jan 2025 11:21:00 +0100 Subject: [PATCH 05/11] Added messagecontent with more specific payload type info; --- .../Conversations/Item/ConversationItem.tsx | 54 +++++++++++++++---- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/packages/apps/chat-app/src/components/Chat/Conversations/Item/ConversationItem.tsx b/packages/apps/chat-app/src/components/Chat/Conversations/Item/ConversationItem.tsx index a64677a75..a021408b3 100644 --- a/packages/apps/chat-app/src/components/Chat/Conversations/Item/ConversationItem.tsx +++ b/packages/apps/chat-app/src/components/Chat/Conversations/Item/ConversationItem.tsx @@ -13,9 +13,13 @@ import { ErrorNotification, } from '@homebase-id/common-app'; import { ChevronDown, Persons } from '@homebase-id/common-app/icons'; -import { ReactNode, useEffect, useMemo } from 'react'; +import { memo, ReactNode, useEffect, useMemo } from 'react'; import { useChatMessages } from '../../../../hooks/chat/useChatMessages'; -import { ChatDeletedArchivalStaus, ChatMessage } from '../../../../providers/ChatProvider'; +import { + CHAT_LINKS_PAYLOAD_KEY, + ChatDeletedArchivalStaus, + ChatMessage, +} from '../../../../providers/ChatProvider'; import { ChatDeliveryIndicator } from '../../Detail/ChatDeliveryIndicator'; import { MessageDeletedInnerBody } from '../../Detail/ChatMessageItem'; import { ChatSentTimeIndicator } from '../../Detail/ChatSentTimeIndicator'; @@ -188,15 +192,7 @@ const ConversationBody = ({
{lastMessage && lastMessageContent ? ( - lastMessage.fileMetadata.appData.archivalStatus === ChatDeletedArchivalStaus ? ( - - ) : lastMessageContent.message ? ( -

- {plainLastMessageContent} -

- ) : ( -

📷 {t('Media')}

- ) + ) : !fetchedMessages && conversationId ? ( ) : null} @@ -214,6 +210,42 @@ const ConversationBody = ({ ); }; +export const MessageContent = memo((message: HomebaseFile) => { + const lastMessageContent = message.fileMetadata.appData.content; + const plainLastMessageContent = getPlainTextFromRichText(lastMessageContent?.message); + + const textMessage = message.fileMetadata.appData.content.message; + const { payloads } = message.fileMetadata; + if (message.fileMetadata.appData.archivalStatus === ChatDeletedArchivalStaus) { + return ; + } + if (textMessage?.length > 0) { + return ( +

{plainLastMessageContent}

+ ); + } else if (payloads && payloads?.length > 1) { + return

📸 {t('Medias')}

; + } else { + const payload = payloads?.[0]; + if (!payload) return null; + if (payload.contentType.startsWith('image')) { + return

📷 {t('Image')}

; + } else if ( + payload.contentType.startsWith('video') || + payload.contentType === 'application/vnd.apple.mpegurl' + ) { + return

🎥 {t('Video')}

; + } else if (payload.contentType.startsWith('audio')) { + return

🎵 {t('Audio')}

; + } else if (payload.key === CHAT_LINKS_PAYLOAD_KEY) { + return

🔗 {t('Link')}

; + } else { + return

📄 {t('File')}

; + } + } +}); +MessageContent.displayName = 'MessageContent'; + export const ConversationContextMenu = ({ conversation, }: { From fbee0cf8ebe27fb56405276e1c91e34e69d50fcf Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Thu, 9 Jan 2025 13:38:54 +0100 Subject: [PATCH 06/11] Text ellipsis on channel and direct nav; --- .../Conversations/Item/ConversationItem.tsx | 4 +- .../Community/CommunityChannelNav.tsx | 93 +++++++++++-------- 2 files changed, 56 insertions(+), 41 deletions(-) diff --git a/packages/apps/chat-app/src/components/Chat/Conversations/Item/ConversationItem.tsx b/packages/apps/chat-app/src/components/Chat/Conversations/Item/ConversationItem.tsx index a021408b3..53453ff48 100644 --- a/packages/apps/chat-app/src/components/Chat/Conversations/Item/ConversationItem.tsx +++ b/packages/apps/chat-app/src/components/Chat/Conversations/Item/ConversationItem.tsx @@ -160,8 +160,6 @@ const ConversationBody = ({ )?.length : 0; - const lastMessageContent = lastMessage?.fileMetadata.appData.content; - const plainLastMessageContent = getPlainTextFromRichText(lastMessageContent?.message); const hasNoContextMenu = stringGuidsEqual(conversationId, ConversationWithYourselfId); return ( @@ -191,7 +189,7 @@ const ConversationBody = ({ {lastMessage ? : null}
- {lastMessage && lastMessageContent ? ( + {lastMessage ? ( ) : !fetchedMessages && conversationId ? ( diff --git a/packages/apps/community-app/src/templates/Community/CommunityChannelNav.tsx b/packages/apps/community-app/src/templates/Community/CommunityChannelNav.tsx index 3b808d334..8830889e1 100644 --- a/packages/apps/community-app/src/templates/Community/CommunityChannelNav.tsx +++ b/packages/apps/community-app/src/templates/Community/CommunityChannelNav.tsx @@ -3,6 +3,7 @@ import { useParams, useMatch, Link, useNavigate } from 'react-router-dom'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { ActionButton, + ActionGroup, COMMUNITY_ROOT_PATH, ConnectionImage, ConnectionName, @@ -146,6 +147,7 @@ export const CommunityChannelNav = ({ isOnline }: { isOnline: boolean }) => { key={channel.fileId || channel.fileMetadata.appData.uniqueId} /> ))} + {pinnedChannels?.length && unpinnedChannels?.length ?
: null} {unpinnedChannels ?.slice(0, isExpanded ? undefined : maxChannels - (pinnedChannels?.length || 0)) @@ -299,8 +301,10 @@ const ChannelItem = ({ update: { mutate: updateMetadata }, } = useCommunityMetadata({ odinId: odinKey, communityId: communityKey }); - const isPinned = - channelId && metadata?.fileMetadata.appData.content?.pinnedChannels?.includes(channelId); + const isPinned = useMemo( + () => channelId && metadata?.fileMetadata.appData.content?.pinnedChannels?.includes(channelId), + [metadata, channelId] + ); const { data: messages } = useCommunityMessages({ odinId: odinKey, @@ -330,45 +334,57 @@ const ChannelItem = ({ ); const hasUnreadMessages = !!unreadMessagesCount; + const linkBackground = `${isActive ? 'bg-primary/100 text-white' : `${!isTouchDevice() ? 'hover:bg-primary/20' : ''}`}`; + + const togglePin = useCallback(() => { + if (!metadata || !channelId) return; + let newPins: string[] = []; + if (isPinned) { + newPins = + metadata?.fileMetadata.appData.content?.pinnedChannels?.filter( + (pin) => pin !== channelId + ) || []; + } else { + newPins = [...(metadata?.fileMetadata.appData.content?.pinnedChannels || []), channelId]; + } + + const newMeta: NewHomebaseFile | HomebaseFile = { + ...metadata, + }; + newMeta.fileMetadata.appData.content.pinnedChannels = newPins; + + updateMetadata({ metadata: newMeta }); + }, [metadata, channelId, isPinned]); + return ( - # {channel.fileMetadata.appData.content?.title?.toLowerCase()} - + + + + {unreadMessagesCount && !isActive ? ( - + {unreadMessagesCount} @@ -430,10 +446,11 @@ const DirectMessageItem = ({ className={`flex flex-row gap-2 rounded-md px-2 py-[0.15rem] ${unreadCount ? 'font-bold' : ''} ${isActive ? 'bg-primary/100 text-white' : `${!isTouchDevice() ? 'hover:bg-primary/10' : ''}`}`} > - - + +

- +

+ {isYou ? ( {t('you')} ) : ( From 189216aad85782455b12f249536a65d7af2f2646 Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Thu, 9 Jan 2025 14:38:29 +0100 Subject: [PATCH 07/11] Better match RTE with final output; --- .../src/components/plate-ui/paragraph-element.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/rich-text-editor/src/components/plate-ui/paragraph-element.tsx b/packages/common/rich-text-editor/src/components/plate-ui/paragraph-element.tsx index c13f8cf3e..c43aa656c 100644 --- a/packages/common/rich-text-editor/src/components/plate-ui/paragraph-element.tsx +++ b/packages/common/rich-text-editor/src/components/plate-ui/paragraph-element.tsx @@ -6,7 +6,7 @@ import { PlateElement } from './plate-element'; export const ParagraphElement = withRef( ({ children, className, ...props }, ref) => { return ( - + {children} ); From dccf4fbb84b67d343e5e9d47c3010ece417728ee Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Thu, 9 Jan 2025 14:38:35 +0100 Subject: [PATCH 08/11] Fix broken media navs; --- .../Message/detail/CommunityMediaGallery.tsx | 2 ++ .../Community/Message/item/CommunityMedia.tsx | 13 ++++++++----- .../common/common-app/src/helpers/richTextHelper.ts | 6 ++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/apps/community-app/src/components/Community/Message/detail/CommunityMediaGallery.tsx b/packages/apps/community-app/src/components/Community/Message/detail/CommunityMediaGallery.tsx index 9ee24233a..f45bd25a2 100644 --- a/packages/apps/community-app/src/components/Community/Message/detail/CommunityMediaGallery.tsx +++ b/packages/apps/community-app/src/components/Community/Message/detail/CommunityMediaGallery.tsx @@ -178,6 +178,7 @@ export const CommunityMediaGallery = ({ const CustomOdinImage = ({ className, + previewThumbnail, ...props }: { className?: string; previewThumbnail?: EmbeddedThumb } & ImageSource) => { const dotYouClient = useDotYouClientContext(); @@ -202,6 +203,7 @@ const CustomOdinImage = ({ className={`absolute inset-0 h-full w-full max-w-none object-contain object-center transition-opacity delay-500 ${finalLoaded ? 'opacity-0' : 'opacity-100'}`} dotYouClient={dotYouClient} {...props} + previewThumbnail={previewThumbnail} blur="auto" onLoad={(naturalSize: ImageSize | undefined) => { setTinyLoaded(true); diff --git a/packages/apps/community-app/src/components/Community/Message/item/CommunityMedia.tsx b/packages/apps/community-app/src/components/Community/Message/item/CommunityMedia.tsx index 15c95ced3..f431da64b 100644 --- a/packages/apps/community-app/src/components/Community/Message/item/CommunityMedia.tsx +++ b/packages/apps/community-app/src/components/Community/Message/item/CommunityMedia.tsx @@ -40,7 +40,7 @@ export const CommunityMedia = ({ ); const isGallery = payloads && payloads.length >= 2; const navigate = useNavigate(); - const { odinKey, communityKey, channelKey } = useParams(); + const { odinKey, communityKey, channelKey, threadKey } = useParams(); if (!payloads?.length) return null; if (isGallery) return ; @@ -54,11 +54,14 @@ export const CommunityMedia = ({ fileLastModified={msg.fileMetadata.updated} payload={payloads[0]} fit={'contain'} - onClick={() => + onClick={() => { + const rootPath = `${COMMUNITY_ROOT_PATH}/${odinKey}/${communityKey}/${channelKey || msg.fileMetadata.appData.content.channelId}`; navigate( - `${COMMUNITY_ROOT_PATH}/${odinKey}/${communityKey}/${channelKey || msg.fileMetadata.appData.content.channelId}/${msg.fileMetadata.appData.uniqueId}/${payloads[0].key}` - ) - } + threadKey + ? `${rootPath}/${threadKey}/thread/${msg.fileMetadata.appData.uniqueId}/${payloads[0].key}` + : `${rootPath}/${msg.fileMetadata.appData.uniqueId}/${payloads[0].key}` + ); + }} previewThumbnail={isGallery ? undefined : msg.fileMetadata.appData.previewThumbnail} className={`my-1 max-h-[35rem] max-w-xs overflow-hidden rounded-lg`} /> diff --git a/packages/common/common-app/src/helpers/richTextHelper.ts b/packages/common/common-app/src/helpers/richTextHelper.ts index 4acfa8f9e..a3a4b6cef 100644 --- a/packages/common/common-app/src/helpers/richTextHelper.ts +++ b/packages/common/common-app/src/helpers/richTextHelper.ts @@ -86,8 +86,10 @@ export const trimRichText = (richText: RichText | undefined): RichText | undefin const trimmed: RichText = []; const trimNode = (node: Record): Record => { - const newText = (typeof node.text === 'string' ? node.text?.trim() : undefined) ?? undefined; - const newValue = (typeof node.value === 'string' ? node.value?.trim() : undefined) ?? undefined; + const newText = + (node && typeof node.text === 'string' ? node.text?.trim() : undefined) ?? undefined; + const newValue = + (node && typeof node.value === 'string' ? node.value?.trim() : undefined) ?? undefined; return { ...node, From 881ffb3cb15f5ea1f63160476fe3d0b25add11da Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Thu, 9 Jan 2025 14:41:21 +0100 Subject: [PATCH 09/11] Build fix --- .../Community/Message/detail/CommunityMediaGallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apps/community-app/src/components/Community/Message/detail/CommunityMediaGallery.tsx b/packages/apps/community-app/src/components/Community/Message/detail/CommunityMediaGallery.tsx index f45bd25a2..9817a8642 100644 --- a/packages/apps/community-app/src/components/Community/Message/detail/CommunityMediaGallery.tsx +++ b/packages/apps/community-app/src/components/Community/Message/detail/CommunityMediaGallery.tsx @@ -185,7 +185,7 @@ const CustomOdinImage = ({ const [tinyLoaded, setTinyLoaded] = useState(false); const [finalLoaded, setFinalLoaded] = useState(false); - const [naturalSize, setNaturalSize] = useState(props.previewThumbnail); + const [naturalSize, setNaturalSize] = useState(previewThumbnail); return (
Date: Thu, 9 Jan 2025 14:42:59 +0100 Subject: [PATCH 10/11] Import cleanup; --- .../components/Community/catchup/CommunityChannelCatchup.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apps/community-app/src/components/Community/catchup/CommunityChannelCatchup.tsx b/packages/apps/community-app/src/components/Community/catchup/CommunityChannelCatchup.tsx index 81af90b1c..c4f6114f4 100644 --- a/packages/apps/community-app/src/components/Community/catchup/CommunityChannelCatchup.tsx +++ b/packages/apps/community-app/src/components/Community/catchup/CommunityChannelCatchup.tsx @@ -2,7 +2,7 @@ import { HomebaseFile } from '@homebase-id/js-lib/core'; import { CommunityDefinition } from '../../../providers/CommunityDefinitionProvider'; import { ChannelWithRecentMessage } from '../../../hooks/community/channels/useCommunityChannelsWithRecentMessages'; import { CommunityHistory } from '../channel/CommunityHistory'; -import { ActionLink, COMMUNITY_ROOT_PATH, t } from '@homebase-id/common-app'; +import { ActionLink, COMMUNITY_ROOT_PATH } from '@homebase-id/common-app'; import { ExternalLink } from '@homebase-id/common-app/icons'; export const CommunityChannelCatchup = ({ From 94ed836b485ef37c9a4527f44c8ae13f389e08ef Mon Sep 17 00:00:00 2001 From: Stef Coenen Date: Thu, 9 Jan 2025 14:51:20 +0100 Subject: [PATCH 11/11] Pass originId into CommunityMedia; --- .../components/Community/Message/item/CommunityMedia.tsx | 7 +++++-- .../Community/Message/item/CommunityMessageItem.tsx | 6 ++++++ .../src/components/Community/channel/CommunityHistory.tsx | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/apps/community-app/src/components/Community/Message/item/CommunityMedia.tsx b/packages/apps/community-app/src/components/Community/Message/item/CommunityMedia.tsx index f431da64b..3a867f7a3 100644 --- a/packages/apps/community-app/src/components/Community/Message/item/CommunityMedia.tsx +++ b/packages/apps/community-app/src/components/Community/Message/item/CommunityMedia.tsx @@ -30,10 +30,12 @@ export const CommunityMedia = ({ odinId, communityId, msg, + originId, }: { odinId: string; communityId: string; msg: HomebaseFile | NewHomebaseFile; + originId?: string; }) => { const payloads = msg.fileMetadata.payloads?.filter( (pyld) => pyld.key !== DEFAULT_PAYLOAD_KEY && pyld.key !== BACKEDUP_PAYLOAD_KEY @@ -55,10 +57,11 @@ export const CommunityMedia = ({ payload={payloads[0]} fit={'contain'} onClick={() => { + const threadPathPart = originId || threadKey || undefined; const rootPath = `${COMMUNITY_ROOT_PATH}/${odinKey}/${communityKey}/${channelKey || msg.fileMetadata.appData.content.channelId}`; navigate( - threadKey - ? `${rootPath}/${threadKey}/thread/${msg.fileMetadata.appData.uniqueId}/${payloads[0].key}` + threadPathPart + ? `${rootPath}/${threadPathPart}/thread/${msg.fileMetadata.appData.uniqueId}/${payloads[0].key}` : `${rootPath}/${msg.fileMetadata.appData.uniqueId}/${payloads[0].key}` ); }} diff --git a/packages/apps/community-app/src/components/Community/Message/item/CommunityMessageItem.tsx b/packages/apps/community-app/src/components/Community/Message/item/CommunityMessageItem.tsx index dee048785..15b6296e4 100644 --- a/packages/apps/community-app/src/components/Community/Message/item/CommunityMessageItem.tsx +++ b/packages/apps/community-app/src/components/Community/Message/item/CommunityMessageItem.tsx @@ -48,6 +48,7 @@ export const CommunityMessageItem = memo( communityActions?: CommunityActions; hideDetails?: boolean; hideThreads?: boolean; + originId?: string; showChannelName?: boolean; className?: string; scrollRef?: React.RefObject; @@ -58,6 +59,7 @@ export const CommunityMessageItem = memo( communityActions, hideDetails, hideThreads, + originId, showChannelName, className, scrollRef, @@ -214,6 +216,7 @@ export const CommunityMessageItem = memo( msg={msg} community={community} scrollRef={scrollRef} + originId={originId} /> ) : ( ; community?: HomebaseFile; + originId?: string; scrollRef?: React.RefObject; }) => { const content = msg.fileMetadata.appData.content; @@ -447,6 +452,7 @@ const CommunityMediaMessageBody = ({ msg={msg} communityId={community?.fileMetadata.appData.uniqueId as string} odinId={community?.fileMetadata.senderOdinId as string} + originId={originId} />
diff --git a/packages/apps/community-app/src/components/Community/channel/CommunityHistory.tsx b/packages/apps/community-app/src/components/Community/channel/CommunityHistory.tsx index 785b90fd1..30dc38a9f 100644 --- a/packages/apps/community-app/src/components/Community/channel/CommunityHistory.tsx +++ b/packages/apps/community-app/src/components/Community/channel/CommunityHistory.tsx @@ -321,6 +321,7 @@ export const CommunityHistory = memo( hideThreads={inAThread} className="px-2 py-1 md:px-3" showChannelName={!channel && !inAThread} + originId={origin?.fileMetadata.appData.uniqueId} />
);