diff --git a/mautrix_appservice/__init__.py b/mautrix_appservice/__init__.py index f48c4756..dcec85cf 100644 --- a/mautrix_appservice/__init__.py +++ b/mautrix_appservice/__init__.py @@ -3,5 +3,5 @@ from .state_store import StateStore from .intent_api import IntentAPI -__version__ = "0.3.10.dev1" +__version__ = "0.3.11" __author__ = "Tulir Asokan " diff --git a/mautrix_appservice/intent_api.py b/mautrix_appservice/intent_api.py index c5cecbfb..4021bf89 100644 --- a/mautrix_appservice/intent_api.py +++ b/mautrix_appservice/intent_api.py @@ -803,7 +803,14 @@ async def send_state_event(self, room_id: str, event_type: str, content: dict, has_pl = await self._ensure_has_power_level_for(room_id, event_type, is_state_event=True) if has_pl: url = self._get_state_url(room_id, event_type, state_key) - return await self.client.request("PUT", url, content, **kwargs) + resp = await self.client.request("PUT", url, content, **kwargs) + self.state_store.update_state({ + "type": event_type, + "room_id": room_id, + "state_key": state_key, + "content": content, + }) + return resp async def get_state_event(self, room_id: str, event_type: str, state_key: Optional[str] = "" ) -> dict: diff --git a/setup.py b/setup.py index 231a32f3..362af590 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name="mautrix-appservice", - version="0.3.10.dev1", + version="0.3.11", url="https://github.com/tulir/mautrix-appservice-python", author="Tulir Asokan",