]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
make event urls federate
authorHannes Mannerheim <h@nnesmannerhe.im>
Fri, 9 Oct 2015 14:22:47 +0000 (16:22 +0200)
committerHannes Mannerheim <h@nnesmannerhe.im>
Fri, 9 Oct 2015 14:22:47 +0000 (16:22 +0200)
plugins/Event/EventPlugin.php

index 75bdfd2ec38990cd19afc502965e08ca056513b4..4e9d153b1616c3e7ddfafe8d8cdfb5b84c419b4b 100644 (file)
@@ -164,6 +164,13 @@ class EventPlugin extends MicroAppPlugin
             $location = $location_object->item(0)->nodeValue;
         }
 
+        // url is optional
+        $url = null;
+        $url_object = $happeningObj->element->getElementsByTagName('url');
+        if($url_object->length > 0) {
+            $url = $url_object->item(0)->nodeValue;
+        }
+
         $notice = null;
 
         switch ($activity->verb) {
@@ -175,7 +182,7 @@ class EventPlugin extends MicroAppPlugin
                                          $happeningObj->title,
                                          $location,
                                          $happeningObj->summary,
-                                         null,
+                                         $url,
                                          $options);
             break;
         case RSVP::POSITIVE:
@@ -251,8 +258,8 @@ class EventPlugin extends MicroAppPlugin
                               common_date_iso8601($happening->end_time));
 
         $obj->extra[] = array('location', false, $happening->location);
+        $obj->extra[] = array('url', false, $happening->url);
 
-               // FIXME: add URL
         // XXX: probably need other stuff here
 
         return $obj;