How to avoid data duplication vk callback api?

The thing that is in the group post with a photoeGfxU2JyiI8.jpg, adding a comment to a post the same comments attached to the photos and this simultaneously triggers two events wall_reply_new and photo_comment_new I have processing these events, the meaning of which is sent a "notice" to the PM the result is a "duplicate" messages. To receive events, I get php://input
how do I handle 2 simultaneous events so as not to duplicate the message in the PM roughly if
I work wall_reply_new and photo_comment_new at the same time I want to process only wall_reply_new
March 19th 20 at 08:39
1 answer
March 19th 20 at 08:41
We decided this:
When an event is received photo_comment_new make a request to VK API https://api.vk.com/method/photos.getById and there check if the given post_id image, if there is, then the picture attached to the post and ignore this notification because it will come at the same time and wall_reply_new

Find more questions by tags VKontakteAPIPHP