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

Method caller #230

Open
tarik02 opened this issue May 1, 2018 · 2 comments
Open

Method caller #230

tarik02 opened this issue May 1, 2018 · 2 comments

Comments

@tarik02
Copy link

tarik02 commented May 1, 2018

How to get the caller (e.g. msg.sender) in method registered with exportInterface?

@sidorares
Copy link
Owner

At the moment it's not possible, the only way to access to that is to listen on bus.connection.on('message')

Method is called there:

methodCallResult = handler[0].apply(null, msg.body);

We can probably pass whole message as "this" parameter ( or this.context or something )

@tarik02
Copy link
Author

tarik02 commented May 2, 2018

I did it with "prependListener" with saving the message in a global variable, but it is a bad solution, so issue will be opened.

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