Greeting is incorrect when logging in
jamescridland opened this issue · 1 comments
jamescridland commented
In forwardemail.net/app/controllers/web/auth.js there is a sliver of code that reads…
let greeting = 'Good morning';
if (dayjs().format('HH') >= 12 && dayjs().format('HH') <= 17)
greeting = 'Good afternoon';
else if (dayjs().format('HH') >= 17) greeting = 'Good evening';
However, dayjs() here is running on the server, and not on the client. Which, for me, means that I am told “Good morning” in the evening when I log in, since I’m in GMT+1000 in Brisbane, Australia.
It’s not a big deal; but two ways to fix it are either a) write JavaScript to run locally and choose a greeting from that; or, probably better, b) to remove this code altogether, and change the greeting to read ‘Welcome back!’
niftylettuce commented
This is an internal TODO, but since you caught it I'll try to fix shortly 😄