I am recording conversation with bot via fbDirect , when bot sends template message, bot crashes it goes into loop.It works perfectly with text messages.
This the output
![screen shot 2017-12-28 at 1 00 05 pm](https://user-images.githubusercontent.com/10268302/34410260-1e76088c-ebcf-11e7-947d-98e11f5d9b84.png)
"ERR! listen Error: unrecognized attach_file {"extensible_attachment":{"legacy_attachment_id":"942000345958367","story_attachment":{"description":null,"media":{"animated_image":null,"image":{"uri":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQAqtv3Tii110hOn&url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fnewyork-500px.jpg&_nc_hash=AQAcAONUBpnY3AKj","height":0,"width":0},"playable_duration_in_ms":0,"is_playable":false,"playable_url":null},"source":{"text":"ClubGlobals Staging"},"style_list":["vertical_attachment_list","fallback"],"title_with_entities":{"text":"New York, Munich, Berlin"},"properties":[],"url":"https://www.facebook.com/commerce/update/","deduplication_key":"947d41618f00254e3b538ba063f9697f","action_links":[],"messaging_attribution":null,"messenger_call_to_actions":[],"target":{"__typename":"MessengerBusinessMessage","message":"ClubGlobals Staging: Berlin","call_to_actions":[],"business_items":{"nodes":[{"id":"137946783569900","description":"","image_aspect_ratio":null,"image_url":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQArYxElS1ew4Hme&url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fberlin-500px.jpg&_nc_hash=AQB8ZXVO4_lUPoHW","first_metaline":"Germany","name":"Berlin","source_name":null,"target_url":null,"default_action":null,"call_to_actions":[{"action_link":"https://www.facebook.com/commerce/update/","action_open_type":"POSTBACK","action_objects":[{}],"title":"Berlin","user_confirmation":null,"id":"bW5jdGE6Y3RhMV9FbnRNZXNzZW5nZXJDb21tZXJjZUl0ZW1fMTM3OTQ2NzgzNTY5OTAwXzA=","is_disabled":false,"is_mutable_by_server":false,"payment_metadata":null,"render_style":"NORMAL","webview_metadata":{"fallback_url":null,"messenger_extensions":false,"webview_height_ratio":null,"webview_share_button":false},"page_id":"822553554569714"}],"media_blob_attachments":[]},{"id":"375237856256049","description":"","image_aspect_ratio":null,"image_url":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQBlTAYUz7toVMKK&url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fmunich-500px.jpg&_nc_hash=AQD_XSQ9fPKjNR0i","first_metaline":"Germany","name":"Munich","source_name":null,"target_url":null,"default_action":null,"call_to_actions":[{"action_link":"https://www.facebook.com/commerce/update/","action_open_type":"POSTBACK","action_objects":[{}],"title":"Munich","user_confirmation":null,"id":"bW5jdGE6Y3RhMV9FbnRNZXNzZW5nZXJDb21tZXJjZUl0ZW1fMzc1MjM3ODU2MjU2MDQ5XzA=","is_disabled":false,"is_mutable_by_server":false,"payment_metadata":null,"render_style":"NORMAL","webview_metadata":{"fallback_url":null,"messenger_extensions":false,"webview_height_ratio":null,"webview_share_button":false},"page_id":"822553554569714"}],"media_blob_attachments":[]},{"id":"2468242140067785","description":"","image_aspect_ratio":null,"image_url":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQAqtv3Tii110hOn&url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fnewyork-500px.jpg&_nc_hash=AQAcAONUBpnY3AKj","first_metaline":"USA","name":"New York","source_name":null,"target_url":null,"default_action":null,"call_to_actions":[{"action_link":"https://www.facebook.com/commerce/update/","action_open_type":"POSTBACK","action_objects":[{}],"title":"New York","user_confirmation":null,"id":"bW5jdGE6Y3RhMV9FbnRNZXNzZW5nZXJDb21tZXJjZUl0ZW1fMjQ2ODI0MjE0MDA2Nzc4NV8w","is_disabled":false,"is_mutable_by_server":false,"payment_metadata":null,"render_style":"NORMAL","webview_metadata":{"fallback_url":null,"messenger_extensions":false,"webview_height_ratio":null,"webview_share_button":false},"page_id":"822553554569714"}],"media_blob_attachments":[]}]}},"subattachments":[{"description":{"text":""},"media":{"animated_image":null,"image":{"uri":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQArYxElS1ew4Hme&url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fberlin-500px.jpg&_nc_hash=AQB8ZXVO4_lUPoHW","height":0,"width":0},"playable_duration_in_ms":0,"is_playable":false,"playable_url":null},"source":{"text":""},"style_list":["messenger_platform_compact_item","retail_item","fallback"],"title_with_entities":{"text":"Berlin"},"properties":[],"url":null,"deduplication_key":"42c70c079c5a64f361d19cbd379392ae","action_links":[],"messaging_attribution":null,"messenger_call_to_actions":[],"target":{"__typename":"MessengerRetailItem","id":"137946783569900","name":"Berlin","desc":"","thumb_url":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQArYxElS1ew4Hme&url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fberlin-500px.jpg&_nc_hash=AQB8ZXVO4_lUPoHW","item_url":null,"source":null,"image_aspect_ratio":null,"first_metaline":"Germany","second_metaline":null,"third_metaline":null,"default_action":null,"call_to_actions":[{"action_link":"https://www.facebook.com/commerce/update/","action_open_type":"POSTBACK","action_objects":[{}],"title":"Berlin","user_confirmation":null,"id":"bW5jdGE6Y3RhMV9FbnRNZXNzZW5nZXJDb21tZXJjZUl0ZW1fMTM3OTQ2NzgzNTY5OTAwXzA=","is_disabled":false,"is_mutable_by_server":false,"payment_metadata":null,"render_style":"NORMAL","webview_metadata":{"fallback_url":null,"messenger_extensions":false,"webview_height_ratio":null,"webview_share_button":false},"page_id":"822553554569714"}]}},{"description":{"text":""},"media":{"animated_image":null,"image":{"uri":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fmunich-500px.jpg&_nc_hash=AQB5knfukfKewUtW","height":0,"width":0},"playable_duration_in_ms":0,"is_playable":false,"playable_url":null},"source":{"text":""},"style_list":["messenger_platform_compact_item","retail_item","fallback"],"title_with_entities":{"text":"Munich"},"properties":[],"url":null,"deduplication_key":"4f6fbea95ac0710e0bc49d52df1bbd72","action_links":[],"messaging_attribution":null,"messenger_call_to_actions":[],"target":{"__typename":"MessengerRetailItem","id":"375237856256049","name":"Munich","desc":"","thumb_url":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQBlTAYUz7toVMKK&url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fmunich-500px.jpg&_nc_hash=AQD_XSQ9fPKjNR0i","item_url":null,"source":null,"image_aspect_ratio":null,"first_metaline":"Germany","second_metaline":null,"third_metaline":null,"default_action":null,"call_to_actions":[{"action_link":"https://www.facebook.com/commerce/update/","action_open_type":"POSTBACK","action_objects":[{}],"title":"Munich","user_confirmation":null,"id":"bW5jdGE6Y3RhMV9FbnRNZXNzZW5nZXJDb21tZXJjZUl0ZW1fMzc1MjM3ODU2MjU2MDQ5XzA=","is_disabled":false,"is_mutable_by_server":false,"payment_metadata":null,"render_style":"NORMAL","webview_metadata":{"fallback_url":null,"messenger_extensions":false,"webview_height_ratio":null,"webview_share_button":false},"page_id":"822553554569714"}]}},{"description":{"text":""},"media":{"animated_image":null,"image":{"uri":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQAqtv3Tii110hOn&url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fnewyork-500px.jpg&_nc_hash=AQAcAONUBpnY3AKj","height":0,"width":0},"playable_duration_in_ms":0,"is_playable":false,"playable_url":null},"source":{"text":""},"style_list":["messenger_platform_compact_item","retail_item","fallback"],"title_with_entities":{"text":"New York"},"properties":[],"url":null,"deduplication_key":"1e467643e39b69949a26e4c24876ca94","action_links":[],"messaging_attribution":null,"messenger_call_to_actions":[],"target":{"__typename":"MessengerRetailItem","id":"2468242140067785","name":"New York","desc":"","thumb_url":"https://external-frt3-2.xx.fbcdn.net/safe_image.php?d=AQAqtv3Tii110hOn&url=http%3A%2F%2Fcontent.airelo.me%2Fimages%2Fnewyork-500px.jpg&_nc_hash=AQAcAONUBpnY3AKj","item_url":null,"source":null,"image_aspect_ratio":null,"first_metaline":"USA","second_metaline":null,"third_metaline":null,"default_action":null,"call_to_actions":[{"action_link":"https://www.facebook.com/commerce/update/","action_open_type":"POSTBACK","action_objects":[{}],"title":"New York","user_confirmation":null,"id":"bW5jdGE6Y3RhMV9FbnRNZXNzZW5nZXJDb21tZXJjZUl0ZW1fMjQ2ODI0MjE0MDA2Nzc4NV8w","is_disabled":false,"is_mutable_by_server":false,"payment_metadata":null,"render_style":"NORMAL","webview_metadata":{"fallback_url":null,"messenger_extensions":false,"webview_height_ratio":null,"webview_share_button":false},"page_id":"822553554569714"}]}}]}}}
ERR! listen at _formatAttachment (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/utils.js:354:13)
ERR! listen at attachments.map.v (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/utils.js:376:55)
ERR! listen at Array.map (native)
ERR! listen at Object.formatDeltaMessage (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/utils.js:376:46)
ERR! listen at resolveAttachmentUrl (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/src/listen.js:159:40)
ERR! listen at resolveAttachmentUrl (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/src/listen.js:168:30)
ERR! listen at parsePackets (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/src/listen.js:171:19)
ERR! listen at Array.forEach (native)
ERR! listen at /Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/src/listen.js:109:12
ERR! listen at tryCatcher (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/node_modules/bluebird/js/main/util.js:26:23)
ERR! listen at Promise._settlePromiseFromHandler (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/node_modules/bluebird/js/main/promise.js:510:31)
ERR! listen at Promise._settlePromiseAt (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/node_modules/bluebird/js/main/promise.js:584:18)
ERR! listen at Promise._settlePromises (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/node_modules/bluebird/js/main/promise.js:700:14)
ERR! listen at Async._drainQueue (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/node_modules/bluebird/js/main/async.js:123:16)
ERR! listen at Async._drainQueues (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/node_modules/bluebird/js/main/async.js:133:10)
ERR! listen at Immediate.Async.drainQueues (/Users/Abgaryan/Documents/ClubGlobals Project/clubglobalsbot/CG-Bot-2017/testmybot/samples/fbdirect/node_modules/facebook-chat-api/node_modules/bluebird/js/main/async.js:15:14)
ERR! listen at runCallback (timers.js:666:20)
ERR! listen at tryOnImmediate (timers.js:639:5)
ERR! listen at processImmediate [as _immediateCallback] (timers.js:611:5)
"