eion/purple-hangouts

Provide a direct link to received videos
draft
2017-04-27, Eion Robb
a14a663073b1
Parents 1bba72ca5c42
Children edbb22ad8a7c
Provide a direct link to received videos
Fixes issue 115 and issue 103
--- a/hangouts_events.c Fri Apr 21 18:30:25 2017 +1200
+++ b/hangouts_events.c Thu Apr 27 23:15:29 2017 +1200
@@ -769,6 +769,11 @@
const gchar *url = plus_photo->url;
PurpleHttpConnection *connection;
+ // Provide a direct link to the video
+ if (plus_photo->media_type == PLUS_PHOTO__MEDIA_TYPE__MEDIA_TYPE_VIDEO && plus_photo->download_url != NULL) {
+ url = plus_photo->download_url;
+ }
+
if (g_strcmp0(purple_core_get_ui(), "BitlBee") == 0) {
// Bitlbee doesn't support images, so just plop a url to the image instead
if (g_hash_table_contains(ha->group_chats, conv_id)) {