Badge tweaks for XF upgrade - note that the message_user_info inside XF has differences from this (probably from the new version?). Need to review before updating here