Compare commits
No commits in common. "4ec8ab50e714e934cc7c9ff47c8a85dad3be4b64" and "b2487716192a325985a958323abdbffd6bbedd78" have entirely different histories.
4ec8ab50e7
...
b248771619
@ -16,4 +16,4 @@ documentation in the following modules first:
|
|||||||
__app_name__ = "moment"
|
__app_name__ = "moment"
|
||||||
__display_name__ = "Moment"
|
__display_name__ = "Moment"
|
||||||
__reverse_dns__ = "xyz.mx-moment"
|
__reverse_dns__ = "xyz.mx-moment"
|
||||||
__version__ = "0.7.4"
|
__version__ = "0.7.4"
|
||||||
|
@ -115,6 +115,7 @@ 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"^@.+:.+")
|
||||||
@ -2472,6 +2473,7 @@ 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,
|
||||||
@ -2539,6 +2541,7 @@ 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,
|
||||||
@ -2623,7 +2626,6 @@ 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:
|
||||||
|
@ -28,10 +28,9 @@ class TypeSpecifier(AutoStrEnum):
|
|||||||
Unset = auto()
|
Unset = auto()
|
||||||
ProfileChange = auto()
|
ProfileChange = auto()
|
||||||
MembershipChange = auto()
|
MembershipChange = auto()
|
||||||
Reaction = auto()
|
Reaction = auto()
|
||||||
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."""
|
||||||
@ -361,8 +360,10 @@ 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 = ""
|
||||||
@ -442,4 +443,5 @@ 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)
|
||||||
|
@ -619,7 +619,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 onRoomNameEvent(
|
async def onRoomNameEvent(
|
||||||
self, room: nio.MatrixRoom, ev: nio.RoomNameEvent,
|
self, room: nio.MatrixRoom, ev: nio.RoomNameEvent,
|
||||||
) -> None:
|
) -> None:
|
||||||
@ -630,6 +629,8 @@ 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 c0cb66d62f4b71454fde40b0513f727dd1de32a6
|
Subproject commit 9e9be32d6010cad484a7b12b1a3d19c6cf4c1353
|
Loading…
Reference in New Issue
Block a user