14 Sep 2024 |
Paarth 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 | 木泠 | My plugin MatrixSync is used to sync chat messages between the Matrix room and the Minecraft game. | 11:25:29 |
Mooling | 木泠 | 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 | 木泠 | Download 屏幕截图_20240914_192215.png | 11:25:48 |
Mooling | 木泠 | Download 屏幕截图_20240914_192159.png | 11:25:53 |
Mooling | 木泠 | But I don't know how to format this kind of text messages | 11:26:21 |
Mooling | 木泠 | Does anyone know what to do? | 11:26:59 |
Alex | 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 | 木泠 | 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 |
Alex | 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 | 木泠 | 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 | 木泠 | Thanks for your help. | 18:12:54 |
Alex | sure | 18:13:03 |
Mooling | 木泠 | 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 | 木泠 | Redacted or Malformed Event | 18:20:55 |
Mooling | 木泠 | Download 1506.png | 18:21:06 |
Mooling | 木泠 | Indeed. | 18:21:53 |
| nex (she/it) changed their profile picture. | 19:53:10 |
| nex (she/it) changed their profile picture. | 20:10:19 |
| nex (she/it) changed their profile picture. | 20:14:43 |
15 Sep 2024 |
ifiguero | !help | 13:14:05 |
ifiguero | Looks like bots are sleeping. | 13:14:55 |
ifiguero | 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 | 木泠 | Is it possible to make the bot change roomnicks for members in a room? | 10:17:47 |
| @clemooling:matrix.staringplanet.top left the room. | 11:21:46 |
nex (she/it) | im not sure if you can change the nicks of other users | 13:41:21 |
nex (she/it) | room or global | 13:41:28 |
ifiguero | I think you could redact state changes or something like that | 14:23:26 |
ifiguero | I haven't tried using nio but I think I saw it when you ban someone from a room you can remove also their state information or something. | 14:25:35 |
ifiguero |
Redactions may be applied both to normal room messages as well as to remove the human-visible aspects of state events (e.g. offensive display names, avatars, etc).
https://matrix.org/docs/older/moderation/ | 14:25:49 |