13 lines
307 B
Plaintext
Raw Normal View History

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