Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion desktop/src/features/forum/ui/ForumComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from "@/features/messages/ui/MentionAutocomplete";
import { MessageComposerToolbar } from "@/features/messages/ui/MessageComposerToolbar";
import type { ChannelMember } from "@/shared/api/types";
import type { UserProfileLookup } from "@/features/profile/lib/identity";
import { Button } from "@/shared/ui/button";

type ForumComposerProps = {
Expand All @@ -38,6 +39,7 @@ type ForumComposerProps = {
) => undefined | Promise<unknown>;
/** When true, autocomplete renders below the input (for top-of-view composers). */
autocompleteBelow?: boolean;
profiles?: UserProfileLookup;
};

export function ForumComposer({
Expand All @@ -49,6 +51,7 @@ export function ForumComposer({
onCancel,
onSubmit,
autocompleteBelow = false,
profiles,
}: ForumComposerProps) {
const [content, setContent] = React.useState("");
const contentRef = React.useRef(content);
Expand All @@ -62,7 +65,7 @@ export function ForumComposer({
setIsFormattingOpen(pressed);
}, []);

const mentions = useMentions(channelId, members);
const mentions = useMentions(channelId, members, profiles);
const channelLinks = useChannelLinks();
const media = useMediaUpload();

Expand Down
1 change: 1 addition & 0 deletions desktop/src/features/forum/ui/ForumThreadPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ export function ForumThreadPanel({
isSending={isSendingReply}
onSubmit={onReply}
placeholder="Reply to this post..."
profiles={profiles}
/>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions desktop/src/features/forum/ui/ForumView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export function ForumView({
setIsComposerOpen(false);
}}
placeholder="Write your post..."
profiles={profiles}
/>
) : (
<button
Expand Down
1 change: 1 addition & 0 deletions desktop/src/features/messages/ui/MessageThreadPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ export function MessageThreadPanel({
onEditSave={onEditSave}
onSend={onSend}
placeholder={`Reply in thread to ${threadHead.author}`}
profiles={profiles}
replyTarget={composerReplyTarget}
toolbarExtraActions={toolbarExtraActions}
typingParentEventId={threadHead.id}
Expand Down
1 change: 1 addition & 0 deletions desktop/src/features/pulse/ui/PulseView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ export function PulseView({ currentPubkey }: PulseViewProps) {
onSubmit={(content, mentionPubkeys, mediaTags) =>
publishMutation.mutateAsync({ content, mentionPubkeys, mediaTags })
}
profiles={mentionProfiles}
/>
</div>
</div>
Expand Down
Loading