Getting environment in platform configuration

Hello, I currently need to get the environment in facebook platform. I’m currently modifying the lib/platforms/facebook/facebook.js to send different message depends on the environment.
Can you show me how I can get the environment in platform? I have tried init global context helper but chat-platform doesn’t have this.context().

It’s this line:

var environment = this.context().global.environment === 'production' ? 'production' : 'development';

But keep in mind in the next version this will change to take into account ENV variables.

Do you need something that work at code level? Otherwise you can do the same with the Rules node

Sorry for the late reply.
I need something that work at code level. But if the next version changed to use ENV variables then I can wait for it. This issues is not very urgent at the moment.