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

feat(plugins): add basic message construction #5754

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Dec 5, 2024

This adds the API I described in #4999 (comment). There are minor differences (e.g. flags belong to a specific element). Some helper functions aren't there yet. This is only the bare-bones construction.

The /hello-world example works with this implementation.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

src/controllers/plugins/api/ChannelRef.hpp Show resolved Hide resolved

void createUserType(sol::table &c2)
{
c2.new_usertype<Message>("Message", sol::factories([](sol::table tbl) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: the parameter 'tbl' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]

    c2.new_usertype<Message>("Message", sol::factories([](sol::table tbl) {
                                                                     ^

@Nerixyz Nerixyz marked this pull request as ready for review December 8, 2024 18:25
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

Successfully merging this pull request may close these issues.

1 participant