fix: make the autocompletor actually run when editing messages (#445)

This commit is contained in:
Ed L 2021-12-20 11:31:33 +00:00 committed by GitHub
parent 91f6947634
commit 535a40df0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,7 +88,11 @@ export default function MessageEditor({ message, finish }: Props) {
onBlur, onBlur,
...autoCompleteProps ...autoCompleteProps
} = useAutoComplete((v) => setContent(v ?? ""), { } = useAutoComplete((v) => setContent(v ?? ""), {
users: { type: "all" }, users: { type: "channel", id: message.channel!._id },
channels:
message.channel!.channel_type === "TextChannel"
? { server: message.channel!.server_id! }
: undefined,
}); });
return ( return (