ChatButtonApi: do not add buttons if you can't send messages
This commit is contained in:
parent
e58aa5dbab
commit
64fa2f8652
|
@ -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…
Reference in a new issue