mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-12 19:50:04 +05:00
Fisxng error fallback
This commit is contained in:
parent
7dc081cfbc
commit
e35dfebe33
@ -32,13 +32,13 @@ const ConfigChat = () => {
|
||||
}
|
||||
});
|
||||
|
||||
// Load Distant Chat Accept Permission Flags
|
||||
rs.rsJsonApiRequest('/rsChats/getDistantChatPermissionFlags', {}, (data) => {
|
||||
if (data && data.retval !== undefined) {
|
||||
// Load Distant Chat Accept Permission Flags (silent error fallback)
|
||||
rs.rsJsonApiRequest('/rsChats/getDistantChatPermissionFlags', {}, (data, success) => {
|
||||
if (success && data && data.retval !== undefined) {
|
||||
acceptChatFrom = data.retval;
|
||||
m.redraw();
|
||||
}
|
||||
});
|
||||
}, true);
|
||||
|
||||
// Load Max Storage Duration (silent error fallback)
|
||||
rs.rsJsonApiRequest('/rsHistory/getMaxStorageDuration', {}, (data, success) => {
|
||||
@ -114,7 +114,7 @@ const ConfigChat = () => {
|
||||
value: acceptChatFrom,
|
||||
onchange: (e) => {
|
||||
acceptChatFrom = parseInt(e.target.value);
|
||||
rs.rsJsonApiRequest('/rsChats/setDistantChatPermissionFlags', { flags: acceptChatFrom }, () => {});
|
||||
rs.rsJsonApiRequest('/rsChats/setDistantChatPermissionFlags', { flags: acceptChatFrom }, () => {}, true);
|
||||
},
|
||||
}, [
|
||||
m('option', { value: 0 }, 'Everyone'),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user