!JiiOHXrIUCtcOJsZCa:matrix.org

nio

341 Members
The nio matrix python library | Latest stable release 0.25.1 | Latest release candidate 0.25.2rc1 | https://pypi.org/project/matrix-nio/ | Documentation: https://matrix-nio.readthedocs.io/en/stable/133 Servers

Load older messages


SenderMessageTime
21 Sep 2024
@h5lbbz66i62qimho9kxh:matrix.org@h5lbbz66i62qimho9kxh:matrix.org joined the room.08:30:37
@h5lbbz66i62qimho9kxh:matrix.org@h5lbbz66i62qimho9kxh:matrix.org left the room.08:31:04
@nex:nexy7574.co.uknex (she/it) changed their profile picture.21:43:28
@ifiguero:matrix.orgifiguero

I have a question regarding the sync_forever regarding the gaps that are generated by the homeserver on the replies. I was made aware that when you sync, the since token is supposed to mark somewhat of a limit for the response, but the response is always from the latest events backwards in time.

This open some scenario where too many events might happen and the server reply might just be truncated, and your bot might miss some events due to that.

22:29:17
@ifiguero:matrix.orgifigueroScreenshot at 2024-09-19 17-33-16.png
Download Screenshot at 2024-09-19 17-33-16.png
22:29:49
@ifiguero:matrix.orgifigueroShould it be possible to detect when the returned batch generated a gap with your previous sync and request the trailing events while keep fetching the original sync?22:31:10
@ifiguero:matrix.orgifiguero I'm trying to device a way to handle it appropriately, but it feels like the homeserver endpoint is broken and can't be used for this porpuse. 22:34:55
22 Sep 2024
@anton.molyboha:matrix.organton.molybohaimage.png
Download image.png
08:00:04
@anton.molyboha:matrix.organton.molyboha

Yes, you can check the limited property of a timeline to see if there is a gap. You can then call sync using prev_batch property to fill in the gap.

(the screenshot is from https://spec.matrix.org/v1.11/client-server-api/#get_matrixclientv3sync)

08:00:53
@anton.molyboha:matrix.organton.molyboha Another approach is to use AsynClient.room_messages to continuously poll for new messages in a room. 08:06:16
@anton.molyboha:matrix.organton.molyboha * Another approach is to use AsyncClient.room_messages to continuously poll for new messages in a room. 08:06:30
@anton.molyboha:matrix.organton.molybohaWith both approaches you don't have automatic decryption of messages if you are in an encrypted room.08:26:05
@anton.molyboha:matrix.organton.molyboha Also, sync and room_messages may return messages in different order. 08:30:01
@nex:nexy7574.co.uknex (she/it) Is there a way to fetch power-levels on demand? for whatever reason, if I have store_sync_tokens set to True in my AsyncClientConfig, room data is entirely unpopulated on each restart, including users and their consequent power levels 11:35:42
@nex:nexy7574.co.uknex (she/it)image.png
Download image.png
11:38:34
@ifiguero:matrix.orgifiguero
In reply to @anton.molyboha:matrix.org

Yes, you can check the limited property of a timeline to see if there is a gap. You can then call sync using prev_batch property to fill in the gap.

(the screenshot is from https://spec.matrix.org/v1.11/client-server-api/#get_matrixclientv3sync)

The prev_batch is always sent to the sync endpoint. And it you do the math, the only way that you get a gap if you send the since is if the response returns the the newest events.
13:18:45
@ifiguero:matrix.orgifiguero1000053300.jpg
Download 1000053300.jpg
13:19:01
@ifiguero:matrix.orgifigueroI'm unsure how you should call for events in the gap. But I assume you require a custom implementation of the sync loop13:21:19
@ifiguero:matrix.orgifiguero I can handle events out of order, or even repeated if that is required. That is not a problem. I'm just trying to fill the gaps. 13:23:05
26 Sep 2024
@wirdo12398:matrix.orgwirdo12398 joined the room.06:11:26
@wirdo12398:matrix.orgwirdo12398Hello I'm trying to run the following example: https://matrix-nio.readthedocs.io/en/latest/examples.html#manual-encryption-key-verification I have the issue when the message is sent, it is shown in the receiver client that this message is not verified by user (Actually it was commented in the code that this part of the example is not done and to be done by the reader -me). I tried many approaches, I tried to implement the verification by emoji (using another example) but with no success. Can anyone please put me on the right way to do it 06:23:08
@nex:nexy7574.co.uknex (she/it)https://github.com/matrix-nio/matrix-nio/issues/512 is this related to your issue?06:26:24
@wirdo12398:matrix.orgwirdo12398 Yeah thank you, this workaround fixed the verify_with_emoji example. Although the issue is still there, I verified the session and I can see it verified in my sessions, but when sending message to another user, it shows a warning with Encrypted by unknown or deleted device. Do you know anything about this? I don't have any clue 😥 07:26:53
@wirdo12398:matrix.orgwirdo12398 * Yeah thank you, this workaround fixed the verify_with_emoji example. Although the issue is still there, I verified the session and I can see it verified in my sessions, but when sending message to another user, it shows a warning with Encrypted by unknown or deleted device. Do you know anything about this? I don't have any clue 😥
What I did is that I ran the 'verify with emoji' example, and verified the session using the emojis, then I took the credentials.json content and replaced those created by 'manual encrypted verify' example (to use the same session to send the encrypted message), but with no luck, I can see that I used the same session (last active time changes when the message i sent) but the message shows warning that this is unknown or deleted device
07:29:38
@wirdo12398:matrix.orgwirdo12398image.png
Download image.png
07:30:22
@wirdo12398:matrix.orgwirdo12398It is working now, I just deleted the device (from sessions tab) then re-signed in and verified the new session and everything worked fine. This is to help others if someone faced the same issue08:45:39
29 Sep 2024
@nex:nexy7574.co.uknex (she/it)Redacted or Malformed Event20:58:34
1 Oct 2024
@ge54vaw:tum.deRobert Imschweiler changed their profile picture.09:09:13
2 Oct 2024
@nex:nexy7574.co.uknex (she/it)Hey, would anyone be able to help me out with https://github.com/matrix-nio/matrix-nio/issues/525 ?12:00:35
@nex:nexy7574.co.uknex (she/it) changed their profile picture.19:58:05

There are no newer messages yet.


Back to Room ListRoom Version: 4