mirror of
https://github.com/Safe-Support-Chat/ocrcc-chatbox
synced 2024-11-22 18:54:54 +00:00
correctly catch unknown device error
This commit is contained in:
parent
620f7017f3
commit
8f9f0fc8b0
@ -150,8 +150,8 @@ class ChatBox extends React.Component {
|
|||||||
this.chatboxInput.current.focus()
|
this.chatboxInput.current.focus()
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
switch (err["errcode"]) {
|
switch (err["name"]) {
|
||||||
case "M_UNKNOWN": // UnknownDeviceError
|
case "UnknownDeviceError":
|
||||||
Object.keys(err.devices).forEach((userId) => {
|
Object.keys(err.devices).forEach((userId) => {
|
||||||
Object.keys(err.devices[userId]).map((deviceId) => {
|
Object.keys(err.devices[userId]).map((deviceId) => {
|
||||||
this.state.client.setDeviceKnown(userId, deviceId, true);
|
this.state.client.setDeviceKnown(userId, deviceId, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user