discourse-subscriptions/assets/javascripts/discourse/helpers/user-viewing-self.js.es6

10 lines
286 B
JavaScript

import { registerUnbound } from 'discourse-common/lib/helpers';
export default registerUnbound('user-viewing-self', function(model) {
if (Discourse.User.current()){
return Discourse.User.current().username.toLowerCase() === model.username.toLowerCase();
}
return false;
});