Can Will catch video chat request?
My co-workers were joking about being able to count how many days its been since the last time someone hit the video call button so naturally I wanted to add it to our bot.
I don't see anywhere in the documentation for this so is it possible?
Not sure if it's possible - mind checking into the Hipchat API docs to see? Open to a PR that would abstract this and make it available.
It can :)
HipChat nowadays generates a message like this for a video chat. Pretty easy to catch it the message.
日, 08 10月 2017 13:34:31 [DEBUG] RECV: <message from="[email protected]/Adam Papai" type="groupchat" mid="xxx" ts="1507437270.999521" to="[email protected]/bot||proxy|pubproxy-b600.hipchat.com|5262"><body><a href="https://hipchat.com/video/call/xxx?">Click here to join the video call</a></body><x xmlns="http://hipchat.com/protocol/muc#room"><type>system</type><notify>1</notify><color>purple</color><message_format>html</message_format><card><raw>{"style": "link", "description": "Adam Papai has started a room video call. Click the link above to join the call.", "title": "Click here to join the video call", "url": "https://hipchat.com/video/call/xxx?", "validation": {"safehtmls": ["activity.html"], "safeurls": ["url", "images.image", "images.image-small", "images.image-big", "icon.url", "icon.url@2x", "icon", "thumbnail.url@2x", "thumbnail.url"]}, "id": "2720213", "icon": "https://dujrsrsgsd3nh.cloudfront.net/img/hipchat_video_thumb.png"}</raw></card><notification_sender type="user" id="[email protected]/web||proxy|proxy-d611.hipchat.com|5262" /></x><html xmlns="http://jabber.org/protocol/xhtml-im"><body xmlns="http://www.w3.org/1999/xhtml"><a href="https://hipchat.com/video/call/xxx?">Click here to join the video call</a></body></html></message>
So maybe a @hear for *https://hipchat.com/video* would do the trick.
I double checked it. As an XMPP client, we only see this text:
Someone: <a href="https://hipchat.com/video/call/xxx?">Click here to join the video call</a>
I'm sending a PR soon.
Nice! I do wonder if this is common enough functionality that it's worth bundling in to core. (This is the kind of place where the future app library will make things so much easier.)
Thoughts, @woohgit @digitalfiz ?
If there are no further comments, I will close out this issue due to inactivity.