mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 12:52:50 +03:00
Fixed MeshRelay excpetion issue.
This commit is contained in:
parent
f005188dc3
commit
f78450aa86
@ -201,7 +201,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
|
||||
|
||||
// Push any stored message to the peer
|
||||
obj.sendPeerImage = function () {
|
||||
if (obj.id.startsWith('meshmessenger/') && (obj.peer != null) && (obj.user != null) && (typeof obj.user.flags == 'number') && (obj.user.flags & 1)) {
|
||||
if ((typeof obj.id == 'string') && obj.id.startsWith('meshmessenger/') && (obj.peer != null) && (obj.user != null) && (typeof obj.user.flags == 'number') && (obj.user.flags & 1)) {
|
||||
parent.db.Get('im' + obj.user._id, function (err, docs) {
|
||||
if ((err == null) && (docs != null) && (docs.length == 1) && (typeof docs[0].image == 'string')) {
|
||||
try { obj.peer.ws.send(JSON.stringify({ ctrlChannel: '102938', type: 'image', image: docs[0].image })); } catch (ex) { }
|
||||
|
Loading…
Reference in New Issue
Block a user