ruma / homeserver

A Matrix homeserver written in Rust.
https://www.ruma.io/
1.08k stars 41 forks source link

Add /publicRooms endpoint #111

Closed sphinxc0re closed 7 years ago

sphinxc0re commented 7 years ago

This is just a start to see if I got this the right way

sphinxc0re commented 7 years ago

I have a question regarding the underlying data. There are some fields in the response that seem to be missing in the database model:

    /// The URL for the room's avatar, if one is set.
    pub avatar_url: Option<String>,
    /// Whether guest users may join the room and participate in it. If they can, they will be subject to ordinary power level rules like any other user.
    pub guest_can_join: Option<bool>,
    /// The name of the room, if any. May be null.
    pub name: Option<String>,
    /// The number of members joined to the room.
    pub num_joined_members: Option<usize>,
    /// The topic of the room, if any. May be null.
    pub topic: Option<String>,
    /// Whether the room may be viewed by guest users without joining.
    pub world_readable: Option<bool>,

So my question is, where do I get these values from? @mujx

mujx commented 7 years ago

You can also use synapse as a reference. It has a lot more but you get a feeling of what needs to be done. Here is an example.

farodin91 commented 7 years ago

Any progress?

sphinxc0re commented 7 years ago

I'm sorry, but I don't have much time atm to work on this, because I'm working on several other projects and also have my normal work to do. But I really want to finish this mostly because I want to get to know the code a bit more

jimmycuadra commented 7 years ago

No rush at all. Thanks very much for your interest in contributing to the project. When you get back to it, we're here to help however we can!

sphinxc0re commented 7 years ago

I'm so sorry this has been open for so long. I kinda forgot about it 😓 I will close this so someone else can take a shot at the issue

jimmycuadra commented 7 years ago

No worries. Development of ruma has slowed down a lot in the last few months, so you weren't blocking us or anything. You're still welcome to come back to it whenever you want.