Skip to content

Commit ffa9ef5

Browse files
Lingling PengLingling Peng
authored andcommitted
team id is not required
1 parent 6f7c49f commit ffa9ef5

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

synapseclient/client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6059,7 +6059,6 @@ def get_membership_status(self, userid, team):
60596059
team = Team.from_id(id="67890")
60606060
status = team.get_user_membership_status(
60616061
user_id="12345",
6062-
team="67890"
60636062
)
60646063
print(status)
60656064
@@ -6072,8 +6071,7 @@ async def get_membership_status():
60726071
60736072
# Get user's membership status
60746073
status = await team.get_user_membership_status_async(
6075-
user_id="12345",
6076-
team="67890"
6074+
user_id="12345"
60776075
)
60786076
return status
60796077

synapseclient/models/team.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,15 +435,13 @@ async def open_invitations_async(
435435
async def get_user_membership_status_async(
436436
self,
437437
user_id: str,
438-
team: Union[str, int],
439438
*,
440439
synapse_client: Optional[Synapse] = None,
441440
) -> TeamMembershipStatus:
442441
"""Retrieve a user's Team Membership Status bundle for this team.
443442
444443
Arguments:
445444
user_id: Synapse user ID
446-
team: Synapse team ID
447445
synapse_client: If not passed in and caching was not disabled by
448446
`Synapse.allow_client_caching(False)` this will use the last created
449447
instance from the Synapse class constructor.
@@ -455,6 +453,6 @@ async def get_user_membership_status_async(
455453

456454
client = Synapse.get_client(synapse_client=synapse_client)
457455
status = await get_membership_status(
458-
user_id=user_id, team=team, synapse_client=client
456+
user_id=user_id, team=self.id, synapse_client=client
459457
)
460458
return TeamMembershipStatus().fill_from_dict(status)

0 commit comments

Comments
 (0)