It appears that what's causing this bug is the following:
1. In email_user(), we do a find/replace of all URLs for the MNet URL
2. BUT, we only do this if the $user passed in to the function has a flag set that indicates that they are on MNet
3. Most Activity types use the function activity_get_users() to get the list of users who should receive the activity. This function populates the MNet flags for each user.
4. But the ActivityTypeNewview, which is what sends out "shared view" notifications, instead uses the function activity_get_viewaccess_users(), which doesn't populate the MNet flags.
So the solution is to populate the MNet flags for the users generated by activity_get_viewaccess_users()
It appears that what's causing this bug is the following:
1. In email_user(), we do a find/replace of all URLs for the MNet URL
2. BUT, we only do this if the $user passed in to the function has a flag set that indicates that they are on MNet
3. Most Activity types use the function activity_ get_users( ) to get the list of users who should receive the activity. This function populates the MNet flags for each user.
4. But the ActivityTypeNew view, which is what sends out "shared view" notifications, instead uses the function activity_ get_viewaccess_ users() , which doesn't populate the MNet flags.
So the solution is to populate the MNet flags for the users generated by activity_ get_viewaccess_ users()