fix QR settings UI out of sync after update via API

This commit is contained in:
LenAnderson 2024-01-17 20:41:59 +00:00
parent 617cabd7b5
commit 12a40c25a0

View File

@ -248,9 +248,9 @@ export class QuickReplyApi {
if (!qr) { if (!qr) {
throw new Error(`No quick reply with label "${label}" in set "${setName}" found.`); throw new Error(`No quick reply with label "${label}" in set "${setName}" found.`);
} }
qr.label = newLabel ?? qr.label; qr.updateLabel(newLabel ?? qr.label);
qr.message = message ?? qr.message; qr.updateMessage(message ?? qr.message);
qr.title = title ?? qr.title; qr.updateTitle(title ?? qr.title);
qr.isHidden = isHidden ?? qr.isHidden; qr.isHidden = isHidden ?? qr.isHidden;
qr.executeOnStartup = executeOnStartup ?? qr.executeOnStartup; qr.executeOnStartup = executeOnStartup ?? qr.executeOnStartup;
qr.executeOnUser = executeOnUser ?? qr.executeOnUser; qr.executeOnUser = executeOnUser ?? qr.executeOnUser;