Browse Source

Update oauth.py

pull/161/head
Luke 5 years ago
committed by GitHub
parent
commit
27f8bcefe3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      disco/types/oauth.py

10
disco/types/oauth.py

@ -41,11 +41,11 @@ class Application(SlottedModel):
cover_image = Field(text) cover_image = Field(text)
def user_is_owner(self, user): def user_is_owner(self, user):
user = to_snowflake(user) user_id = to_snowflake(user)
if user == self.owner.id: if user_id == self.owner.id:
return True return True
return any(user == member.user.id for member in self.team.members) return any(user_id == member.user.id for member in self.team.members)
def get_icon_url(self, fmt='webp', size=1024): def get_icon_url(self, fmt='webp', size=1024):
if not self.icon: if not self.icon:
@ -69,8 +69,8 @@ class Application(SlottedModel):
class ConnectionVisibility(object): class ConnectionVisibility(object):
Nobody = 0 NOBODY = 0
Everyone = 1 EVERYONE = 1
class Connection(SlottedModel): class Connection(SlottedModel):

Loading…
Cancel
Save