diff --git a/html/app.js b/html/app.js index c6602d46..787e7b57 100644 --- a/html/app.js +++ b/html/app.js @@ -3885,56 +3885,57 @@ CefSharp.BindObjectAsync( API.$on('USER:UPDATE', function (args) { var { ref, props } = args; - if ($app.friends.get(ref.id)) { - if (props.location) { - if (props.location[0] === 'offline') { - $app.addFeed('Offline', ref, { - location: props.location[1], - time: props.location[2] - }); - } else if (props.location[1] === 'offline') { - $app.addFeed('Online', ref, { - location: props.location[0] - }); - } else { - $app.addFeed('GPS', ref, { - location: [ - props.location[0], - props.location[1] - ], - time: props.location[2] - }); - } - } - if (props.currentAvatarThumbnailImageUrl) { - $app.addFeed('Avatar', ref, { - avatar: props.currentAvatarThumbnailImageUrl - }); - } - if (props.status || - props.statusDescription) { - $app.addFeed('Status', ref, { - status: [ - { - status: props.status - ? props.status[0] - : ref.status, - statusDescription: props.statusDescription - ? props.statusDescription[0] - : ref.statusDescription - }, - { - status: props.status - ? props.status[1] - : ref.status, - statusDescription: props.statusDescription - ? props.statusDescription[1] - : ref.statusDescription - } - ] + if ($app.friends.has(ref.id) === false) { + return; + } + if (props.location) { + if (props.location[0] === 'offline') { + $app.addFeed('Offline', ref, { + location: props.location[1], + time: props.location[2] + }); + } else if (props.location[1] === 'offline') { + $app.addFeed('Online', ref, { + location: props.location[0] + }); + } else { + $app.addFeed('GPS', ref, { + location: [ + props.location[0], + props.location[1] + ], + time: props.location[2] }); } } + if (props.currentAvatarThumbnailImageUrl) { + $app.addFeed('Avatar', ref, { + avatar: props.currentAvatarThumbnailImageUrl + }); + } + if (props.status || + props.statusDescription) { + $app.addFeed('Status', ref, { + status: [ + { + status: props.status + ? props.status[0] + : ref.status, + statusDescription: props.statusDescription + ? props.statusDescription[0] + : ref.statusDescription + }, + { + status: props.status + ? props.status[1] + : ref.status, + statusDescription: props.statusDescription + ? props.statusDescription[1] + : ref.statusDescription + } + ] + }); + } }); var saveFeedTimer = null;