ChatButtonApi: do not add buttons if you can't send messages

main
Vendicated 9 months ago
parent e58aa5dbab
commit 64fa2f8652
No known key found for this signature in database
GPG Key ID: D66986BAF75ECF18

@ -80,6 +80,8 @@ const buttonFactories = new Map<string, ChatBarButton>();
const logger = new Logger("ChatButtons");
export function _injectButtons(buttons: ReactNode[], props: ChatBarProps) {
if (props.disabled) return;
for (const [key, makeButton] of buttonFactories) {
try {
const res = makeButton(props, props.type.analyticsName === "normal");

Loading…
Cancel
Save