Create New Feature as same as Etherpad but it has Issue on Middleware

Hello, Hope you guys doing well.
So iam trying to make a new feature inside conference room, this feature we call it as Whiteboard feature, it is as the same as the Etherpad ( Document Sharing ), so i just remake my new folder and structure as same as the Etherpad. I’ve success create the button on the more action but when i clicked it It doesn’t do anything.

I trace my code and then i found that my Whiteboard Middleware is not working, but the Etherpad is working

And this is my middleware function that’s not working.