Add iframe command 'logout'

pull/4764/head
Nicolas 9 years ago
parent bff9ad1acd
commit b03d7136d1
  1. 9
      packages/rocketchat-ui/lib/iframeCommands.js

@ -36,6 +36,15 @@ const commands = {
console.log('Iframe command [login-with-token]: result', arguments);
});
}
},
'logout'() {
const user = Meteor.user();
Meteor.logout(() => {
RocketChat.callbacks.run('afterLogoutCleanUp', user);
Meteor.call('logoutCleanUp', user);
return FlowRouter.go('home');
});
}
};

Loading…
Cancel
Save