Method /userinfo doesn't call rules

Yesterday i created a rule, which added user’s metadata to response. /userinfo returned user’s metadata. However, today i updated this rule, and it is not called by /userinfo anymore. What can be the reason?
It is still called by /oauth/token though.
Rule code:

function(user, context, callback) {
	console.log(context);
  context.idToken.user_metadata= user.user_metadata;
  callback(null, user, context);
}

Okay, the problem was that i was not sending context.
Is there a way to send user_metada without context?

function(user, context, callback) {
	console.log(context);
  var namespace = 'https://my-domain.my-company.com/';
  context.idToken[namespace + 'user_metadata']= user.user_metadata;
  callback(null, user, context);
}

What i am recieving is

"https://my-domain.my-company.com/user_metadata": {

        "data1": "redux",

        "data2": "ab",

        "data3": "ab",

        "data4": "ab",

        "apellido": "One"

    }

Is there a way to set key “user_metadata” instead of URL ?

Hey there!

As Rules & Hooks are being fully deprecated soon, maybe you’re interested in finding out more how to achieve that with Actions?

As this topic is related to Rules - Hooks - Actions and Rules & Hooks are being deprecated soon I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!