How to get note ID in context menu triggered command?

I'm currently searching for a solution to get the current note ID, when I try to trigger a command from the note-list context menu. So actually I know how to get the selected note ID, but the context menu can also be opened "on" another note which is currently not selected (or active).

Here's a screenshot of what I am meaning:

image

In this case the selected note is "5. Privacy", but the context menu was opened on "1. Welcome...".

Is there a way to get the correct ID in a plugin (command) in this case?

Indeed it was not possible, but will be in the next pre-release. Any command triggered from the context menu will now receive a noteIds array which will include the relevant note.

See here for an example: