Compare commits

..

4 Commits

Author SHA1 Message Date
4ec8ab50e7 fuck merge conflicts 2024-01-22 22:28:00 +11:00
85e78bae0e amend! Merged with 0.7.4 release
Merged with 0.7.4 release
2024-01-22 19:27:12 +11:00
442a1aafee amend! Merged with 0.7/4 release
Merged with 0.7/4 release
2024-01-22 19:26:43 +11:00
c7287c861c Merged with 0.7/4 release 2024-01-22 19:21:52 +11:00
6 changed files with 9 additions and 14 deletions

View File

@ -115,7 +115,6 @@ class MatrixImageInfo(NamedTuple):
class MatrixClient(nio.AsyncClient): class MatrixClient(nio.AsyncClient):
<<<<<<< HEAD
"""A client for an account to interact with a matrix homeserver.""" """A client for an account to interact with a matrix homeserver."""
user_id_regex = re.compile(r"^@.+:.+") user_id_regex = re.compile(r"^@.+:.+")
@ -2473,7 +2472,6 @@ class MatrixClient(nio.AsyncClient):
content=key, hidden=True, **fields, content=key, hidden=True, **fields,
) )
async def register_message_replacement( async def register_message_replacement(
self, self,
room: nio.MatrixRoom, room: nio.MatrixRoom,
@ -2541,7 +2539,6 @@ class MatrixClient(nio.AsyncClient):
hidden=True, **fields, hidden=True, **fields,
) )
async def register_nio_event( async def register_nio_event(
self, self,
room: nio.MatrixRoom, room: nio.MatrixRoom,
@ -2626,6 +2623,7 @@ class MatrixClient(nio.AsyncClient):
if from_us and tx_id and f"echo-{tx_id}" in model: if from_us and tx_id and f"echo-{tx_id}" in model:
item.id = f"echo-{tx_id}" item.id = f"echo-{tx_id}"
self.event_to_echo_ids[ev.event_id] = item.id self.event_to_echo_ids[ev.event_id] = item.id
reactions = self.unassigned_reaction_events.get(item.id, {}) reactions = self.unassigned_reaction_events.get(item.id, {})
for key, senders in reactions.items(): # update reactions for key, senders in reactions.items(): # update reactions
if key not in item.reactions: if key not in item.reactions:

View File

@ -32,6 +32,7 @@ class TypeSpecifier(AutoStrEnum):
ReactionRedaction = auto() ReactionRedaction = auto()
MessageReplace = auto() MessageReplace = auto()
class PingStatus(AutoStrEnum): class PingStatus(AutoStrEnum):
"""Enum for the status of a homeserver ping operation.""" """Enum for the status of a homeserver ping operation."""
@ -360,10 +361,8 @@ class Event(ModelItem):
mentions: List[Tuple[str, str]] = field(default_factory=list) mentions: List[Tuple[str, str]] = field(default_factory=list)
reactions: Dict[str, Dict[str, Any]] = field(default_factory=dict) reactions: Dict[str, Dict[str, Any]] = field(default_factory=dict)
replaced: bool = False replaced: bool = False
content_history: List[Dict[str, Any]] = field(default_factory=list) content_history: List[Dict[str, Any]] = field(default_factory=list)
type_specifier: TypeSpecifier = TypeSpecifier.Unset type_specifier: TypeSpecifier = TypeSpecifier.Unset
target_id: str = "" target_id: str = ""
@ -443,5 +442,4 @@ class Event(ModelItem):
return json.dumps(source_dict) return json.dumps(source_dict)
if field == "content_history": if field == "content_history":
return serialize_value_for_qml(self.content_history) return serialize_value_for_qml(self.content_history)
return super().serialized_field(field) return super().serialized_field(field)

View File

@ -619,6 +619,7 @@ class NioCallbacks:
await self.client.register_nio_event(room, ev, content=co) await self.client.register_nio_event(room, ev, content=co)
# Room events, invite events and misc events callbacks
async def onRoomNameEvent( async def onRoomNameEvent(
self, room: nio.MatrixRoom, ev: nio.RoomNameEvent, self, room: nio.MatrixRoom, ev: nio.RoomNameEvent,
) -> None: ) -> None:
@ -629,8 +630,6 @@ class NioCallbacks:
await self.client.register_nio_event(room, ev, content=co) await self.client.register_nio_event(room, ev, content=co)
# Room events, invite events and misc events callbacks
async def onRoomMessageText( async def onRoomMessageText(
self, room: nio.MatrixRoom, ev: nio.RoomMessageText, self, room: nio.MatrixRoom, ev: nio.RoomMessageText,
) -> None: ) -> None:

@ -1 +1 @@
Subproject commit 9e9be32d6010cad484a7b12b1a3d19c6cf4c1353 Subproject commit c0cb66d62f4b71454fde40b0513f727dd1de32a6