Do not consider activities as changed if user is offline
This commit is contained in:
parent
b96a5577c5
commit
82cf202b76
1 changed files with 5 additions and 1 deletions
4
index.js
4
index.js
|
@ -106,7 +106,11 @@ function socketeer() {
|
||||||
} else if (data.op == 0) {
|
} else if (data.op == 0) {
|
||||||
lanyardData = data
|
lanyardData = data
|
||||||
lanyardData.d.socials = JSON.parse(fs.readFileSync(path.join(configPath, "socials.json")))
|
lanyardData.d.socials = JSON.parse(fs.readFileSync(path.join(configPath, "socials.json")))
|
||||||
|
if (lanyardData.d.discord_status == "offline") {
|
||||||
|
lanyardData.d.activityChanged = false
|
||||||
|
} else {
|
||||||
lanyardData.d.activityChanged = lastActivity != JSON.stringify(lanyardData.d.activities)
|
lanyardData.d.activityChanged = lastActivity != JSON.stringify(lanyardData.d.activities)
|
||||||
|
}
|
||||||
lastActivity = JSON.stringify(lanyardData.d.activities)
|
lastActivity = JSON.stringify(lanyardData.d.activities)
|
||||||
|
|
||||||
for (let index = 0; index < sockets.length; index++) {
|
for (let index = 0; index < sockets.length; index++) {
|
||||||
|
|
Loading…
Reference in a new issue