Permalink
Browse files

Do not try to sync Discord users who did not link their account

  • Loading branch information...
SeinopSys committed Jan 12, 2019
1 parent dcb9ff5 commit 030423be6dc0fa6d907dff44933fe4b1790b818a
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/Models/DiscordMember.php
@@ -136,7 +136,7 @@ public function updateAccessToken(?AccessToken $token = null, bool $save = true)
public const SYNC_COOLDOWN = 5 * Time::IN_SECONDS['minute'];
public function canBeSynced(){
return $this->last_synced === null || $this->last_synced->getTimestamp() + self::SYNC_COOLDOWN <= time();
return ($this->last_synced === null || $this->last_synced->getTimestamp() + self::SYNC_COOLDOWN <= time()) && $this->isLinked();
}
public function sync(Discord $provider = null, bool $force = false, bool $auto_unlink = true):bool {

0 comments on commit 030423b

Please sign in to comment.