Conditional filemenu entry in Files App


i try to implement a conditional filemenu entry into the files app. You can find the code here

In Line 116, i want to add an advance filter for actions to remove all actions, which does not satisfy my conditions. (I want to show my new actions only, when certain conditions are satisfied.)
With the js debugger, i can see that the function will be added correctly to OCA.Files.fileActions._actionFilters. But it will never be executed at all, because my filter function is gone in _actionFilters, when the Files App generates the file entries in the fileslist view.

All entries were added in the files list, because i can find them in the file menu. Do you have any ideas, how i can find the issue?
Thank you very much.

p.s. i wrote this text in the rocketchat, but i got no answers so far (no chat activity there at all). So i hope i can get help here :slight_smile:

For more context, i want to use this function: