I've found what was the problem: in my SendGrid account there was Link Branding enabled. But that's little bit strange because it was enabled before moving to the new server and it worked fine.
b2e508e4-4bbf-4212-aee6-02b14cea34b5-image.png
Whenever I navigate to the url /chats and I click on a specific chat room to see the messages I get this error...
/chats/NaN Not Found
You seem to have stumbled upon a page that does not exist. Return to the home page.
When I inspect the element of the chat room it shows the proper room id 1 in data-roomid so this must be a problem with the function.
And I can get to the chat room successfully from the drop down in the header and also expand it from there. The url /chats/1 loads the chat room fine. It's just clicking on the chat room from the /chats page that gives me the error.
There's no errors in the ./nodebb log or in the browser console log. Any idea how I could debug and fix this?