Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples: Getting room names #103

Open
kallisti5 opened this issue Dec 22, 2023 · 0 comments
Open

Examples: Getting room names #103

kallisti5 opened this issue Dec 22, 2023 · 0 comments

Comments

@kallisti5
Copy link

kallisti5 commented Dec 22, 2023

Any chance of an example pulling in room information like it's name? The API isn't exactly easy to use / understand with the mixed layers of abstraction (I think some of this the complexities of Matrix). There also doesn't appear to be any documentation about any of this stuff.

Here was my best guess which was... wrong. Horribly wrong.

               for (mtx::events::collections::StateEvents &ev : room.state.events)
                       if (auto event = std::get_if<mtx::events::StateEvent<mtx::identifiers::Room>>(&ev);
                                       event != nullptr)
                       {
                               joinedMsg.AddString("chat_name", event->content.name.c_str());
                       }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant