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

Add access to message in method handler #82

Open
lesha1201 opened this issue Aug 24, 2021 · 1 comment
Open

Add access to message in method handler #82

lesha1201 opened this issue Aug 24, 2021 · 1 comment

Comments

@lesha1201
Copy link
Contributor

It would be nice to have an access to a message in method handler. Currently, we only have message body but sometimes you need to know, for example, who is sending the message (sender). It can be added without a breaking change by adding it as a last argument:

class ExampleInterface extends Interface {
    // ....

    @method({inSignature: 's', outSignature: 's'})
    Echo(what, message) {
        return what;
    }
    
    // Or it can be an object that contains any other additional info
    @method({inSignature: 's', outSignature: 's'})
    Echo(what, { message }) {
        return what;
    }
}
@acrisci
Copy link
Member

acrisci commented Sep 20, 2021

Yeah I would accept this feature.

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

2 participants