Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/botbuilder-core/botbuilder/core/bot_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from abc import abstractmethod
from copy import deepcopy
from typing import Callable, Dict, Union
from jsonpickle.pickler import Pickler
from botbuilder.core.state_property_accessor import StatePropertyAccessor
from .turn_context import TurnContext
from .storage import Storage
Expand All @@ -24,8 +25,7 @@ def is_changed(self) -> bool:
return self.hash != self.compute_hash(self.state)

def compute_hash(self, obj: object) -> str:
# TODO: Should this be compatible with C# JsonConvert.SerializeObject ?
return str(obj)
return str(Pickler().flatten(obj))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! This is so important that I'm surprised that didn't blow up earlier



class BotState(PropertyManager):
Expand Down