I am not very familiar with private group inboxes and I’m not sure how to reproduce this but the following is happening:
A private message inbox has been set up for a group, let’s call it ExampleGroup.
A member of that group gets a notification ‘there are 6 messages in your examplegroup inbox’
Clicking that notification tries to load /topics/private-messages-group/username/examplegroup.json
This gives an error
I think this is happening because there is no group called examplegroup. The group is called ExampleGroup.
ListController::generate_message_route does this:
group = Group.find_by(name: params[:group_name])
changing this to
group = Group.find_by(name: params[:group_name])
group = Group.where('lower(name) = ?', params[:group_name].downcase).first unless group
seems to resolve the issue. But I’m sure that is not the actual problem. Somewhere the parameter is converted to lower case where it should not be (I think…).
I believe the correct fix here is to not require capitalized group name in URL params. Done via:
Note that browsing to /u/username/messages/group/groupname will fire an AJAX request to /topics/private-messages-group/username/groupname, so what @angus did above to debug this issue does look correct.