Skip to content

Commit

Permalink
fix(matrix/spec): filter_id is a string, not an integer (#2017)
Browse files Browse the repository at this point in the history
Source: https://spec.matrix.org/v1.9/client-server-api/#post_matrixclientv3useruseridfilter

This is explicitly a string in the specification.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Co-authored-by: Jacob Tomlinson <jacob@tomlinson.email>
  • Loading branch information
RaitoBezarius and jacobtomlinson authored Apr 25, 2024
1 parent 15fdf47 commit 5ee8374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opsdroid/connector/matrix/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(self, config, opsdroid=None): # noqa: D107
) # pragma: no cover
self.send_m_notice = config.get("send_m_notice", False)
self.session = None
self.filter_id = None
self.filter_id: str | None = None
self.connection = None
self.device_name = config.get("device_name", "opsdroid")
self.device_id = config.get("device_id", "opsdroid")
Expand Down Expand Up @@ -160,7 +160,7 @@ async def make_filter(self, api, fjson):
resp = await api.send(method="post", path=path, data=fjson, headers=headers)

resp_json = await resp.json()
return int(resp_json["filter_id"])
return resp_json["filter_id"]

async def exchange_keys(self, initial_sync=False):
"""Send to-device messages and perform key exchange operations."""
Expand Down

0 comments on commit 5ee8374

Please sign in to comment.