Skip to content

Commit

Permalink
Fix/update profile avatar data (#401)
Browse files Browse the repository at this point in the history
* fix: replaced avatar return type from BotXAPIAttachment to base64 string

* fix: fixed lint warning

* fix: updated version to 0.55.5 in pyproject.toml
  • Loading branch information
ekulakov-express committed Jun 8, 2023
1 parent f8bae38 commit dc234fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pybotx/client/users_api/update_user_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def from_domain(
user_huid=user_huid,
name=name,
public_name=public_name,
avatar=api_avatar,
avatar=getattr(api_avatar, "data", Undefined),
company=company,
company_position=company_position,
description=description,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pybotx"
version = "0.55.4"
version = "0.55.5"
description = "A python library for interacting with eXpress BotX API"
authors = [
"Sidnev Nikolay <[email protected]>",
Expand Down
5 changes: 1 addition & 4 deletions tests/client/users_api/test_update_user_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ async def test__update_user_profile__maximum_update_succeed(
f"https://{host}/api/v3/botx/users/update_profile",
headers={"Authorization": "Bearer token", "Content-Type": "application/json"},
json={
"avatar": {
"data": "data:image/png;base64,SGVsbG8sIHdvcmxkIQ==",
"file_name": "avatar.png",
},
"avatar": "data:image/png;base64,SGVsbG8sIHdvcmxkIQ==",
"company": "Doge Co",
"company_position": "Chief",
"department": "Commercy",
Expand Down

0 comments on commit dc234fb

Please sign in to comment.