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

13 lines
307 B
Plaintext
Raw Normal View History

2019-10-24 23:00:59 -04:00
import { registerUnbound } from "discourse-common/lib/helpers";
2019-10-24 22:23:32 -04:00
2019-10-24 23:00:59 -04:00
export default registerUnbound("user-viewing-self", function(model) {
if (Discourse.User.current()) {
return (
Discourse.User.current().username.toLowerCase() ===
model.username.toLowerCase()
);
2019-10-24 22:23:32 -04:00
}
return false;
});