Skip to content

Commit dc234fb

Browse files
Fix/update profile avatar data (#401)
* fix: replaced avatar return type from BotXAPIAttachment to base64 string * fix: fixed lint warning * fix: updated version to 0.55.5 in pyproject.toml
1 parent f8bae38 commit dc234fb

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

pybotx/client/users_api/update_user_profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def from_domain(
4747
user_huid=user_huid,
4848
name=name,
4949
public_name=public_name,
50-
avatar=api_avatar,
50+
avatar=getattr(api_avatar, "data", Undefined),
5151
company=company,
5252
company_position=company_position,
5353
description=description,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pybotx"
3-
version = "0.55.4"
3+
version = "0.55.5"
44
description = "A python library for interacting with eXpress BotX API"
55
authors = [
66
"Sidnev Nikolay <nsidnev@ccsteam.ru>",

tests/client/users_api/test_update_user_profile.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ async def test__update_user_profile__maximum_update_succeed(
7777
f"https://{host}/api/v3/botx/users/update_profile",
7878
headers={"Authorization": "Bearer token", "Content-Type": "application/json"},
7979
json={
80-
"avatar": {
81-
"data": "data:image/png;base64,SGVsbG8sIHdvcmxkIQ==",
82-
"file_name": "avatar.png",
83-
},
80+
"avatar": "data:image/png;base64,SGVsbG8sIHdvcmxkIQ==",
8481
"company": "Doge Co",
8582
"company_position": "Chief",
8683
"department": "Commercy",

0 commit comments

Comments
 (0)