Skip to content

Commit

Permalink
Hacky fix for null m.relates_to's
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed May 22, 2019
1 parent 5bd6fe6 commit f6064bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mautrix_appservice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
from .state_store import StateStore
from .intent_api import IntentAPI

__version__ = "0.3.9"
__version__ = "0.3.10.dev1"
__author__ = "Tulir Asokan <[email protected]>"
2 changes: 2 additions & 0 deletions mautrix_appservice/intent_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,8 @@ async def send_event(self, room_id: str, event_type: str, content: dict,

if self.client.is_real_user and self.client.real_user_content_key:
content[self.client.real_user_content_key] = True
if content.get("m.relates_to", "not None") is None:
del content["m.relates_to"]

txn_id = txn_id or str(self.client.txn_id) + str(int(time() * 1000))
self.client.txn_id += 1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setuptools.setup(
name="mautrix-appservice",
version="0.3.9",
version="0.3.10.dev1",
url="https://github.com/tulir/mautrix-appservice-python",

author="Tulir Asokan",
Expand Down

0 comments on commit f6064bc

Please sign in to comment.