diff --git a/lib/persona.js b/lib/persona.js index 41f2647..99d2a79 100644 --- a/lib/persona.js +++ b/lib/persona.js @@ -25,12 +25,12 @@ $(document).ready(function() { NProgress.done(); setupHoverCards(); - if (data.url && data.url.match('user/')) { - setupFavouriteButtonOnProfile(); - } else if (data.url && data.url.match('^chats')) { + if (data.url && data.url.match('^user/.+/chats')) { require(['persona/chats'], function(chats) { chats.init(); }); + } else if (data.url && data.url.match('user/')) { + setupFavouriteButtonOnProfile(); } }); }