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
6
index.js
6
index.js
|
@ -106,7 +106,11 @@ function socketeer() {
|
|||
} else if (data.op == 0) {
|
||||
lanyardData = data
|
||||
lanyardData.d.socials = JSON.parse(fs.readFileSync(path.join(configPath, "socials.json")))
|
||||
lanyardData.d.activityChanged = lastActivity != JSON.stringify(lanyardData.d.activities)
|
||||
if (lanyardData.d.discord_status == "offline") {
|
||||
lanyardData.d.activityChanged = false
|
||||
} else {
|
||||
lanyardData.d.activityChanged = lastActivity != JSON.stringify(lanyardData.d.activities)
|
||||
}
|
||||
lastActivity = JSON.stringify(lanyardData.d.activities)
|
||||
|
||||
for (let index = 0; index < sockets.length; index++) {
|
||||
|
|
Loading…
Reference in a new issue