poshbotio / PoshBot.Dilbert

PoshBot module for retrieving Dilbert comics
MIT License
1 stars 3 forks source link

Protocol handler missing from URI posted by PoshBot #1

Closed csandfeld closed 5 years ago

csandfeld commented 5 years ago

Dilbert comic is not shown because the returned URI does not include a http: or https: protocol handler.

Current Behavior

When invoking the !dilbert command, a URI without a protocol handler is posted, and no image is shown.

Example: //assets.amuniversal.com/8c92b0a0f6940136776e005056a9545d

Expected Behavior

When invoking the !dilbert command, a URI with a protocol handler should be posted, and thus the image would be shown.

Example: http://assets.amuniversal.com/8c92b0a0f6940136776e005056a9545d ... or ... https://assets.amuniversal.com/8c92b0a0f6940136776e005056a9545d

Possible Solution

Looks like the returned HTML source gives a URI without the protocol handler. Add protocol handler if it is missing. Alternatively use the links in the metadate for Twitter or Facebook Open Graph

Steps to Reproduce (for bugs)

  1. Install PoshBot.Dilbert plugin
  2. Invoke !dilbert
  3. Observe posted value

Context

Your Environment

Using Slack backend

devblackops commented 5 years ago

@csandfeld Thanks for the heads up! Looks like the HTML source changed. I'll push a fix.

devblackops commented 5 years ago

Fixed in 5173ab10949c87d2f6144cc318ed7278921e2cb0

Version 1.1.0 released to PowerShell Gallery.

csandfeld commented 5 years ago

Thanks :-)