!SMloEYlhCiqKwRLAgY:fachschaften.org

Conduit Matrix Server

1506 Members
https://conduit.rs Release Party! v0.6.0 We follow the Matrix Code of Conduct838 Servers

Load older messages


SenderMessageTime
1 Dec 2023
@matthias:ahouansou.czMatthiasApparently not:16:35:09
@matthias:ahouansou.czMatthiasclipboard.png
Download clipboard.png
16:35:13
@matthias:ahouansou.czMatthiasI think ik what the problem may be tho..16:35:55
@gitlab:nheko.imGitlab [famedly/conduit] _ZN3val opened merge request !562: Room v11

Resolves https://gitlab.com/famedly/conduit/-/issues/408


  • [x] I agree to release my code and all other changes of this MR under the Apache-2.0 license
17:18:32
@gitlab:nheko.imGitlab [famedly/conduit] _ZN3val changed the title of merge request !562 to Add support for room v11 17:18:49
@val:trix.revalcan't see the image, could you copy-paste it?17:19:32
@val:trix.reval* can't see the image, could you copy-paste the error?17:19:39
@grayshade:dend.roGrayShade Me neither 17:23:17
@testosteron1:matrix.orgtestosteron1 joined the room.17:36:09
@kermit:glowy.rehabfrog ⚡️their server is offline, they likely cannot see these messages yet :p17:36:38
@gitlab:nheko.imGitlab [famedly/conduit] zecakeh commented on merge request !562: Add support for room v11

v11 actually allow all keys here, and there are other changes in the redaction rules. I am wondering why this doesn't use the methods from Ruma, like ruma::canonical_json::redact_content_in_place, is it a type issue?

17:45:34
@gitlab:nheko.imGitlab [famedly/conduit] _ZN3val commented on merge request !562: Add support for room v11

Ah you're right, I misunderstood the spec.

17:52:38
@matthias:ahouansou.czMatthias
In reply to @val:trix.re
can't see the image, could you copy-paste the error?
error[E0382]: use of moved value: `room_alias_result`
   --> src/database/mod.rs:966:42
    |
964 |                 for room_alias_result in room_aliases {
    |                     -----------------
    |                     |
    |                     this reinitialization might get skipped
    |                     move occurs because `room_alias_result` has type `std::result::Result<OwnedRoomAliasId, utils::error::Error>`, which does not implement the `Copy` trait
965 |                     for pattern in &services().globals.co...
966 |                         let room_alias = room_alias_result?;
    |                                          ^^^^^^^^^^^^^^^^^-
    |                                          |
    |                                          `room_alias_result` moved due to this method call, in previous iteration of loop
    |
17:58:21
@val:trix.revalmove it out of the inner loop17:58:59
@matthias:ahouansou.czMatthiasthe pattern one?18:00:23
@matthias:ahouansou.czMatthiasWell that does work. :) But is there no performance penalty for fetching the list of rooms for every pattern?18:05:03
@matthias:ahouansou.czMatthiasNvm, I guess you meant move it out of that pattern loop18:06:20
@matthias:ahouansou.czMatthiasWorks aswell!18:06:26
@val:trix.revalI don't know18:06:28
@matthias:ahouansou.czMatthiasI should have noticed that, the error makes sense now.18:07:45
@gitlab:nheko.imGitlab [famedly/conduit] _ZN3val commented on merge request !562: Add support for room v11

I switched to redact_content_in_place, it seems to work (tested only on m.room.message). Thanks!

18:11:06
@matthias:ahouansou.czMatthiasAnyways, thanks for the help!18:11:35
@matthias:ahouansou.czMatthias
In reply to @val:trix.re
can't see the image, could you copy-paste the error?
I usually use image because it prevents wrapping (which can make it unreadable) and it keeps the colours.
20:13:13
@matthias:ahouansou.czMatthias I created a mock-mr if someone wants to review it: https://codeberg.org/Kladky/conduit/pulls/1 21:07:49
@val:trix.revalIf it's statically defined (or unlikely to change), you can compile all the patterns into one big regexp. It's much faster than checking all patterns, when there are many.21:17:14
@val:trix.reval* If it's statically defined (or changes rarely), you can compile all the patterns into one big regexp. It's much faster than checking all patterns, when there are many.21:17:24
@matthias:ahouansou.czMatthiasYou mean compiling it when loading the config?21:29:57
@matthias:ahouansou.czMatthias* You mean compiling it when loading/deserializing the config?21:31:12
@timo:conduit.rsTimo on Conduit ⚡️Instead of defining a Vec<Regex>, you could just input a Regex and let the user combine them, but that's not great. Probably a better solution is to just take a string from the config and save a compiled version in the globals21:37:08
@timo:conduit.rsTimo on Conduit ⚡️But I don't think performance matters for this21:37:23

There are no newer messages yet.


Back to Room ListRoom Version: 6