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;
|
|
|
|
});
|