mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
embedded bots: Support multi-entry state modification.
This commit is contained in:
@@ -49,9 +49,10 @@ class StateHandler:
|
||||
|
||||
def put(self, key: Text, value: Text) -> None:
|
||||
set_bot_state(self.user_profile, key, self.marshal(value))
|
||||
set_bot_state(self.user_profile, [(key, self.marshal(value))])
|
||||
|
||||
def remove(self, key: Text) -> None:
|
||||
remove_bot_state(self.user_profile, key)
|
||||
remove_bot_state(self.user_profile, [key])
|
||||
|
||||
def contains(self, key: Text) -> bool:
|
||||
return is_key_in_bot_state(self.user_profile, key)
|
||||
|
||||
Reference in New Issue
Block a user