!JiiOHXrIUCtcOJsZCa:matrix.org

nio

352 Members
The nio matrix python library | Latest release 0.4 https://pypi.org/project/matrix-nio/ | Documentation: https://matrix-nio.readthedocs.io/en/stable/137 Servers

Load older messages


SenderMessageTime
11 Sep 2024
@nex:nexy7574.co.uknex (she/it)

It's only until everything else catches up :*)

23:46:28
12 Sep 2024
@nex:nexy7574.co.uknex (she/it)

I just noticed, there is no /_matrix/client/v1/media/upload, it's still /_matrix/media/v3/upload, so uploading media with nio appears to be broken right now

02:35:34
@nex:nexy7574.co.uknex (she/it)If nobody's gotten to this in the morning, I'll open a PR (it's 3am, so I'm going to sleep first lol), but realistically this could be a one-line update02:36:49
@nex:nexy7574.co.uknex (she/it) #523 opened :) (cc Paarth Shah - Github Maintainer) 12:38:14
14 Sep 2024
@me:shahpaarth.comPaarth Shah - Github Maintainer
In reply to @nex:nexy7574.co.uk
#523 opened :) (cc Paarth Shah - Github Maintainer)
Merged 👌🏾
Can cut an update when I'm at my desk next
03:26:29
@mooling:envs.netMooling | 木泠 My plugin MatrixSync is used to sync chat messages between the Matrix room and the Minecraft game. 11:25:29
@mooling:envs.netMooling | 木泠Now I find that when someone in the Matrix room quotes arbitrary messages and replies, the forwarding format is not very beautiful.11:25:33
@mooling:envs.netMooling | 木泠屏幕截图_20240914_192215.png
Download 屏幕截图_20240914_192215.png
11:25:48
@mooling:envs.netMooling | 木泠屏幕截图_20240914_192159.png
Download 屏幕截图_20240914_192159.png
11:25:53
@mooling:envs.netMooling | 木泠But I don't know how to format this kind of text messages11:26:21
@mooling:envs.netMooling | 木泠Does anyone know what to do?11:26:59
@timegrid:matrix.c3s.ccAlex

i guess, you could just process the received message yourself in https://github.com/Mooling0602/MatrixSync-MCDR/blob/main/matrix_sync/receiver.py#L12
maybe parse event.formatted_body instead, which is mostly html and less ambigue and wraps the refered message in <mx-reply> tags (but might also be None), but then you probably need to convert the html yourself, if minecraft can't handle it

15:58:42
@mooling:envs.netMooling | 木泠
In reply to @timegrid:matrix.c3s.cc

i guess, you could just process the received message yourself in https://github.com/Mooling0602/MatrixSync-MCDR/blob/main/matrix_sync/receiver.py#L12
maybe parse event.formatted_body instead, which is mostly html and less ambigue and wraps the refered message in <mx-reply> tags (but might also be None), but then you probably need to convert the html yourself, if minecraft can't handle it

Yes, Minecraft(MCDR) can't handle html directly, I need to convert the html to a text string.
But actually I don't know how to handle line breaks in sending messages to Minecraft.
17:49:42
@timegrid:matrix.c3s.ccAlex

line breaks in event.body are just \n escape chars, you can just remove them with event.body.replace('\n', '') or replace them with e.g. event.body.replace('\n', '|'). i don't know what you want to achieve, but it sounds more like a basic python or minecraft problem and not a nio one

18:06:40
@mooling:envs.netMooling | 木泠You are right. I'm not going to replace the line breaks to any other things, but just need to treat line breaks in a single room message as separators and convert the message into multiple game messages.18:12:38
@mooling:envs.netMooling | 木泠Thanks for your help.18:12:54
@timegrid:matrix.c3s.ccAlexsure18:13:03
@mooling:envs.netMooling | 木泠I haven't tested how a room message with line breaks show in the game/console, let me have a check.18:14:56
@mooling:envs.netMooling | 木泠Redacted or Malformed Event18:20:55
@mooling:envs.netMooling | 木泠1506.png
Download 1506.png
18:21:06
@mooling:envs.netMooling | 木泠Indeed.18:21:53
@nex:nexy7574.co.uknex (she/it) changed their profile picture.19:53:10
@nex:nexy7574.co.uknex (she/it) changed their profile picture.20:10:19
@nex:nexy7574.co.uknex (she/it) changed their profile picture.20:14:43
15 Sep 2024
@ifiguero:matrix.orgifiguero!help13:14:05
@ifiguero:matrix.orgifiguero Looks like bots are sleeping. 13:14:55
@ifiguero:matrix.orgifiguero

I wanted to share an update with my bot, that uses nio as a client-server communications: https://codeberg.org/ifiguero/cyberbrain-neuron/. Recently been testing the search of rooms on Open Homeserver Directories.

Got plenty of fun, but there probably is some fine tune required.

13:20:18
16 Sep 2024
@mooling:envs.netMooling | 木泠Is it possible to make the bot change roomnicks for members in a room?10:17:47
@clemooling:matrix.staringplanet.topCleMooling | 木之清泠 left the room.11:21:46
@nex:nexy7574.co.uknex (she/it)im not sure if you can change the nicks of other users13:41:21

Show newer messages


Back to Room ListRoom Version: 4