Skip to content

Commit

Permalink
Update ocs_query, fix various talk functions, v0.0.3
Browse files Browse the repository at this point in the history
* ocs_query defaults to method "GET"
* Add sub={self.conv_stub} to in:
    ocs.talk.get_conversation_participants()
    ocs.talk.set_conversation_guest_display_name()
    ocs.talk.promote_conversation_participant()
* bump version to 0.0.3
  • Loading branch information
aaronsegura committed Sep 2, 2022
1 parent 419ba03 commit d65e8ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion nextcloud_async/api/ocs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class NextCloudOCSAPI(NextCloudBaseAPI):

async def ocs_query(
self,
method: str,
method: str = 'GET',
url: str = None,
sub: str = '',
data: Dict[Any, Any] = {},
Expand Down
6 changes: 3 additions & 3 deletions nextcloud_async/api/ocs/talk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ async def get_conversation_participants(
await self.__get_stubs()

return await self.ocs_query(
sub=f'/room/{token}/participants',
sub=f'{self.conv_stub}/room/{token}/participants',
data={'includeStatus': include_status})

async def send_to_conversation(
Expand Down Expand Up @@ -746,7 +746,7 @@ async def set_conversation_guest_display_name(
return await self.ocs_query(
method='POST',
url=f'{self.endpoint}/ocs/v2.php/apps/spreed/api/v1',
sub=f'/guest/{token}/name',
sub=f'{self.conv_stub}/guest/{token}/name',
data={'displayName': display_name})

async def get_conversation_messages(
Expand Down Expand Up @@ -1115,7 +1115,7 @@ async def promote_conversation_participant(
"""
return await self.ocs_query(
method='POST',
sub=f'/room/{token}/moderators',
sub=f'{self.conv_stub}/room/{token}/moderators',
data={'attendeeId': attendee_id})

async def demote_conversation_participant(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nextcloud_async"
version = "0.0.2"
version = "0.0.3"
authors = [
{ name="Aaron Segura" },
]
Expand Down

0 comments on commit d65e8ab

Please sign in to comment.