2
2
# Licensed under the MIT License.
3
3
4
4
import time
5
- import pytz
6
5
from datetime import datetime
7
6
8
7
from botbuilder .core import ActivityHandler , ConversationState , TurnContext , UserState
@@ -25,10 +24,10 @@ def __init__(self, conversation_state: ConversationState, user_state: UserState)
25
24
self .conversation_state = conversation_state
26
25
self .user_state = user_state
27
26
28
- self .conversation_data = self .conversation_state .create_property (
27
+ self .conversation_data_accessor = self .conversation_state .create_property (
29
28
"ConversationData"
30
29
)
31
- self .user_profile = self .conversation_state .create_property ("UserProfile" )
30
+ self .user_profile_accessor = self .user_state .create_property ("UserProfile" )
32
31
33
32
async def on_turn (self , turn_context : TurnContext ):
34
33
await super ().on_turn (turn_context )
@@ -47,8 +46,8 @@ async def on_members_added_activity(
47
46
48
47
async def on_message_activity (self , turn_context : TurnContext ):
49
48
# Get the state properties from the turn context.
50
- user_profile = await self .user_profile .get (turn_context , UserProfile )
51
- conversation_data = await self .conversation_data .get (
49
+ user_profile = await self .user_profile_accessor .get (turn_context , UserProfile )
50
+ conversation_data = await self .conversation_data_accessor .get (
52
51
turn_context , ConversationData
53
52
)
54
53
0 commit comments