Added query to photo messages