Skip to content

Commit 05b0f56

Browse files
authored
Merge pull request #95 from livechat/fix-login-param
customer_push_level -> customer_monitoring_level
2 parents 9821963 + bf081a1 commit 05b0f56

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [0.3.6] - TBA
5+
6+
### Bugfixes
7+
- Fix `customer_monitoring_level` parameter in `login` method in agent-api v3.3/v3.4/v3.5 classes.
8+
49
## [0.3.5] - 2022-11-25
510

611
### Added

livechat/agent/rtm/api/v33.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ def login(self,
769769
push_notifications: dict = None,
770770
application: dict = None,
771771
away: bool = None,
772-
customer_push_level: str = None,
772+
customer_monitoring_level: str = None,
773773
pushes: dict = None,
774774
payload: dict = None) -> RtmResponse:
775775
''' Logs in agent.
@@ -784,9 +784,9 @@ def login(self,
784784
the application's name and version.
785785
away (bool): When True, the connection is set to the away state.
786786
Defaults to False.
787-
customer_push_level (str): Possible values: my, engaged, online.
787+
customer_monitoring_level (str): Possible values: my, chatting, invited, online.
788788
Defaults to my if login creates the first session;
789-
otherwise it preserves the current customer_push_level.
789+
otherwise it preserves the current customer_monitoring_level.
790790
pushes (dict): Use case: when you want to receive only specific pushes.
791791
By default, it's set to all for the version of your currently established RTM connection.
792792
payload (dict): Custom payload to be used as request's data.

livechat/agent/rtm/api/v34.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ def login(self,
735735
push_notifications: dict = None,
736736
application: dict = None,
737737
away: bool = None,
738-
customer_push_level: str = None,
738+
customer_monitoring_level: str = None,
739739
pushes: dict = None,
740740
payload: dict = None) -> RtmResponse:
741741
''' Logs in agent.
@@ -750,9 +750,9 @@ def login(self,
750750
the application's name and version.
751751
away (bool): When True, the connection is set to the away state.
752752
Defaults to False.
753-
customer_push_level (str): Possible values: my, engaged, online.
753+
customer_monitoring_level (str): Possible values: my, chatting, invited, online.
754754
Defaults to my if login creates the first session;
755-
otherwise it preserves the current customer_push_level.
755+
otherwise it preserves the current customer_monitoring_level.
756756
pushes (dict): Use case: when you want to receive only specific pushes.
757757
By default, it's set to all for the version of your currently established RTM connection.
758758
payload (dict): Custom payload to be used as request's data.

livechat/agent/rtm/api/v35.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ def login(self,
735735
push_notifications: dict = None,
736736
application: dict = None,
737737
away: bool = None,
738-
customer_push_level: str = None,
738+
customer_monitoring_level: str = None,
739739
pushes: dict = None,
740740
payload: dict = None) -> RtmResponse:
741741
''' Logs in agent.
@@ -750,9 +750,9 @@ def login(self,
750750
the application's name and version.
751751
away (bool): When True, the connection is set to the away state.
752752
Defaults to False.
753-
customer_push_level (str): Possible values: my, engaged, online.
753+
customer_monitoring_level (str): Possible values: my, chatting, invited, online.
754754
Defaults to my if login creates the first session;
755-
otherwise it preserves the current customer_push_level.
755+
otherwise it preserves the current customer_monitoring_level.
756756
pushes (dict): Use case: when you want to receive only specific pushes.
757757
By default, it's set to all for the version of your currently established RTM connection.
758758
payload (dict): Custom payload to be used as request's data.

livechat/agent/rtm/api/v36.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ def login(self,
735735
push_notifications: dict = None,
736736
application: dict = None,
737737
away: bool = None,
738-
customer_push_level: str = None,
738+
customer_monitoring_level: str = None,
739739
pushes: dict = None,
740740
payload: dict = None) -> RtmResponse:
741741
''' Logs in agent.
@@ -750,9 +750,9 @@ def login(self,
750750
the application's name and version.
751751
away (bool): When True, the connection is set to the away state.
752752
Defaults to False.
753-
customer_push_level (str): Possible values: my, engaged, online.
753+
customer_monitoring_level (str): Possible values: my, chatting, invited, online.
754754
Defaults to my if login creates the first session;
755-
otherwise it preserves the current customer_push_level.
755+
otherwise it preserves the current customer_monitoring_level.
756756
pushes (dict): Use case: when you want to receive only specific pushes.
757757
By default, it's set to all for the version of your currently established RTM connection.
758758
payload (dict): Custom payload to be used as request's data.

livechat/tests/test_agent_rtm_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_client_logs_in_with_payload():
5050
client = AgentRTM.get_client()
5151
client.open_connection()
5252
response = client.login(payload={
53-
'customer_push_level': 'online',
53+
'customer_monitoring_level': 'online',
5454
'token': 'Bearer 10386012'
5555
})
5656
client.close_connection()

0 commit comments

Comments
 (0)