13 lines
324 B
JavaScript
13 lines
324 B
JavaScript
import { registerUnbound } from "discourse-common/lib/helpers";
|
|
import User from "discourse/models/user";
|
|
|
|
export default registerUnbound("user-viewing-self", function (model) {
|
|
if (User.current()) {
|
|
return (
|
|
User.current().username.toLowerCase() === model.username.toLowerCase()
|
|
);
|
|
}
|
|
|
|
return false;
|
|
});
|