zendesk / sunshine-conversations-ruby

Smooch API Library for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mediaUrl not specified correctly in the docs

mgomes opened this issue · comments

If I attempt to initialize a SmoochApi::MessagePost.new(role: 'appMaker', type: 'image', media_url: 'https://my.com/image.png') (as per the docs https://github.com/smooch/smooch-ruby/blob/master/docs/MessagePost.md), it fails to send media_url along to Smooch. I confirmed by turning on debugging and I can see the body being sent is:

{"role":"appMaker","type":"image"}

However, when if I instead specify the URL using the mediaUrl key, it works: SmoochApi::MessagePost.new(role: 'appMaker', type: 'image', mediaUrl: 'https://my.com/image.png')

The same might be true of mediaType, but I am not using it.

Thanks for the report, I've filed an issue internally to investigate the inconsistency. We'll update here with more details when available

Fixed in v5.0