cheogram-www

created pr with cheogram-www/member-chat.1 on 2026-10-26T16:12:47Z · by 9e834e0d
cmds
checkout latest patchset:
ssh pr.pico.sh pull cheogram-www:member-chat | git am -3
checkout specific patchset revision:
ssh pr.pico.sh pull cheogram-www:member-chat [rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh cheogram-www:member-chat
add comment to patch request:
ssh pr.pico.sh comment cheogram-www:member-chat "lgtm!"

Patchset cheogram-www/member-chat.1 on 2026-10-26T16:12:47Z · commit 38a0d94

Add Chat button to member details dialog
Stephen Paul Weber 2026-10-26T01:44:45Z
To start a new chat with the member if we know their address (and if
they are not ourselves).
Semantic diff summary
0 added, 4 modified, 0 signature changed, 0 removed across 1 analyzed file
+38 -12 src/components/Chats.tsx #
......@@ -42,9 +42,11 @@ import QrCodeScannerIcon from "@mui/icons-material/QrCodeScanner";
4242 import ArrowForward from "@mui/icons-material/ArrowForward";
4343 import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4444 import {
45+ faAt,
4546 faPencil,
4647 faPlus,
4748 faXmark,
49+ faComment,
4850 faMagnifyingGlassArrowRight,
4951 faThumbtack,
5052 } from "@fortawesome/free-solid-svg-icons";
......@@ -405,12 +407,15 @@ export const Chats = () => {
405407 isMobile,
406408 ]);
407409
408- const navigateToChat = async (c: borogove.Chat) => {
410+ const navigateToChat = async (
411+ c: borogove.Chat,
412+ linkParams: URLSearchParams = searchParams,
413+ ) => {
409414 const scrollTo = getChatExtras(c.chatId)?.scrollTo;
410415 const readUpTo = await c.readUpTo();
411416 const readUpToId = readUpTo?.serverId;
412417 navigate(
413- href("./chats/:chatId", { chatId: c.chatId }, searchParams) +
418+ href("./chats/:chatId", { chatId: c.chatId }, linkParams) +
414419 (scrollTo || readUpToId ? `#message:${scrollTo || readUpToId}` : ""),
415420 );
416421 };
......@@ -1137,6 +1142,37 @@ export const Chats = () => {
11371142 )}
11381143 </div>
11391144
1145+ <div>
1146+ {popupMember.chat && !popupMember.isSelf && (
1147+ <Button
1148+ icon={<FontAwesomeIcon icon={faComment} />}
1149+ onClick={() => {
1150+ const memberChat = popupMember.chat;
1151+ if (!memberChat) return;
1152+ const params = new URLSearchParams(searchParams);
1153+ params.delete("memberQ");
1154+ const chat = client.startChat(memberChat);
1155+ setPopupMember(undefined);
1156+ setAddRoleAnchorEl(null);
1157+ void navigateToChat(chat, params);
1158+ }}
1159+ >
1160+ Chat
1161+ </Button>
1162+ )}
1163+
1164+ <Button
1165+ icon={<FontAwesomeIcon icon={faAt} />}
1166+ onClick={() => {
1167+ innerChatRef.current.addMention(popupMember);
1168+ setPopupMember(undefined);
1169+ setAddRoleAnchorEl(null);
1170+ }}
1171+ >
1172+ Mention
1173+ </Button>
1174+ </div>
1175+
11401176 <AwaitOnce
11411177 resolve={() => popupMember.status(client)}
11421178 fallback={<div />}
......@@ -1157,16 +1193,6 @@ export const Chats = () => {
11571193 >
11581194 {(profile) => <Profile profile={profile} />}
11591195 </AwaitOnce>
1160-
1161- <Button
1162- onClick={() => {
1163- innerChatRef.current.addMention(popupMember);
1164- setPopupMember(undefined);
1165- setAddRoleAnchorEl(null);
1166- }}
1167- >
1168- Mention
1169- </Button>
11701196 </Dialog>
11711197 )}
11721198
Back to top