broid-slack shows Error: mediaType.startsWith is not a function when reply message which type is Image
ShinyChang opened this issue · 2 comments
ShinyChang commented
Overview
platform: broid-slack
Steps to Reproduce
- Start application with settings
- Send message
- Reply message with Image which url is
https://goo.gl/OD829u.qr
Observed
TypeError: mediaType.startsWith is not a function
at Parser.parse (/Users/shinychang/bots/node_modules/broid-slack/lib/core/parser.js:53:27)
at MergeMapSubscriber.Rx_1.Observable.merge.mergeMap.mergeMap [as project] (/Users/shinychang/bots/node_modules/broid-slack/lib/core/adapter.js:184:51)
at MergeMapSubscriber._tryNext (/Users/shinychang/bots/node_modules/rxjs/operator/mergeMap.js:120:27)
at MergeMapSubscriber._next (/Users/shinychang/bots/node_modules/rxjs/operator/mergeMap.js:110:18)
at MergeMapSubscriber.Subscriber.next (/Users/shinychang/bots/node_modules/rxjs/Subscriber.js:89:18)
at MergeMapSubscriber.notifyNext (/Users/shinychang/bots/node_modules/rxjs/operator/mergeMap.js:143:30)
at InnerSubscriber._next (/Users/shinychang/bots/node_modules/rxjs/InnerSubscriber.js:23:21)
at InnerSubscriber.Subscriber.next (/Users/shinychang/bots/node_modules/rxjs/Subscriber.js:89:18)
at /Users/shinychang/bots/node_modules/rxjs/util/subscribeToResult.js:36:29
at tryCatcher (/Users/shinychang/bots/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/shinychang/bots/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/shinychang/bots/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/Users/shinychang/bots/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/shinychang/bots/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/Users/shinychang/bots/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/Users/shinychang/bots/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/shinychang/bots/node_modules/bluebird/js/release/async.js:17:14)
at tryOnImmediate (timers.js:543:15)
at processImmediate [as _immediateCallback] (timers.js:523:5)
Expected
Should not throw error in https://github.com/broidHQ/integrations/blob/master/broid-slack/src/core/parser.ts#L67
killix commented
Thanks for the report. It will fix with the next release (track #81).
Look like mimetype
librairie doesn't get the mime type of your url.
killix commented
fixed with the version 2.2.0