Stop putting up previews of slash commands.

This commit is contained in:
Ben Rog-Wilhelm 2023-08-27 06:47:20 -05:00
parent bdeda313cf
commit c415c86cbd

View file

@ -102,7 +102,9 @@ export function ChatProvider({ children }: PropsWithChildren) {
}
}, []);
const sendMessage = useCallback(() => {
if (userToDm) {
if (draft.startsWith("/")) {
// this is a command; just skip posting stuff
} else if (userToDm) {
const directMessage = `<small class="text-primary"><em>(Sent to @${userToDm.username}):</em></small> ${draft}`;
addMessage({