I think it would way better if the comments separated using content types like xengallery_media_comment and xengallery_media_album. As of now there is no way to know if the alert generated was for a media or album.
If the part of the code you're working with simply has access to the content type and the content ID you should have enough information to then query to get the rest of the info you need, e.g. if you're extending XenForo_Model_Like::likeContent:
PHP:
if ($contentType == 'xengallery_comment')
{
$comment = XenForo_Model::create('XenGallery_Model_Comment')->getCommentById($contentId);
}