- return XML::fromArray($data3, $xml, false, $namespaces);
+ return XML::fromArray($data3, $dummy, false, $namespaces);
+ }
+
+ /**
+ * Set values for RSS template
+ *
+ * @param array $arr Array to be passed to template
+ * @param int $cid Contact ID of template
+ *
+ * @return array
+ */
+ private function addRSSValues(array $arr, int $cid): array
+ {
+ if (empty($cid)) {
+ return $arr;
+ }
+
+ $user_info = $this->twitterUser->createFromContactId($cid)->toArray();
+
+ $arr['$user'] = $user_info;
+ $arr['$rss'] = [
+ 'alternate' => $user_info['url'],
+ 'self' => $this->baseUrl . '/' . $this->args->getQueryString(),
+ 'base' => $this->baseUrl,
+ 'updated' => DateTimeFormat::utcNow(DateTimeFormat::API),
+ 'atom_updated' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
+ 'language' => $user_info['lang'],
+ 'logo' => $this->baseUrl . '/images/friendica-32.png',
+ ];
+
+ return $arr;