feat(users): add check for discord account connection

This commit is contained in:
Miguel Nogueira 2022-08-23 02:03:51 +01:00
parent 9c989b0d8e
commit 28e2de65ca
No known key found for this signature in database
GPG Key ID: 3C6A7E29AF26D370

View File

@ -149,6 +149,15 @@ class User extends Authenticatable implements MustVerifyEmail
}
}
/**
* Check if user linked their Discord account
*
* @return bool
*/
public function hasDiscordConnection(): bool {
return !is_null($this->discord_token) && !is_null($this->discord_refresh_token);
}
public function routeNotificationForSlack($notification)
{