]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Support non-image file uploads in Yammer import
authorBrion Vibber <brion@pobox.com>
Wed, 22 Sep 2010 05:00:25 +0000 (22:00 -0700)
committerBrion Vibber <brion@pobox.com>
Tue, 28 Sep 2010 14:44:22 +0000 (07:44 -0700)
plugins/YammerImport/yammerimporter.php

index 6dc72f47663fe036a06558b0e417473f2f6cbc9c..bfe486770c995f7a17ac473ee653a351034a2e72 100644 (file)
@@ -306,8 +306,8 @@ class YammerImporter
 
         $attachments = array();
         foreach ($item['attachments'] as $attach) {
-            if ($attach['type'] == 'image') {
-                $attachments[] = $attach['image']['url'];
+            if ($attach['type'] == 'image' || $attach['type'] == 'file') {
+                $attachments[] = $attach[$attach['type']]['url'];
             } else {
                 common_log(LOG_WARNING, "Unrecognized Yammer attachment type: " . $attach['type']);
             }