We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 89e313e4 authored by Brion Vibber's avatar Brion Vibber

OStatus fix: send the feed's root element, not the DOM document, down to...

OStatus fix: send the feed's root element, not the DOM document, down to low-level feed processing as entry context on PuSH input.
parent 6a377a4b
......@@ -428,10 +428,18 @@ class Ostatus_profile extends Memcached_DataObject
* Currently assumes that all items in the feed are new,
* coming from a PuSH hub.
*
* @param DOMDocument $feed
* @param DOMDocument $doc
* @param string $source identifier ("push")
*/
public function processFeed($feed, $source)
public function processFeed(DOMDocument $doc, $source)
{
$feed = $doc->documentElement;
if ($feed->localName != 'feed' || $feed->namespaceURI != Activity::ATOM) {
common_log(LOG_ERR, __METHOD__ . ": not an Atom feed, ignoring");
return;
}
$entries = $feed->getElementsByTagNameNS(Activity::ATOM, 'entry');
if ($entries->length == 0) {
common_log(LOG_ERR, __METHOD__ . ": no entries in feed update, ignoring");
......@@ -449,6 +457,7 @@ class Ostatus_profile extends Memcached_DataObject
*
* @param DOMElement $entry
* @param DOMElement $feed for context
* @param string $source identifier ("push" or "salmon")
*/
public function processEntry($entry, $feed, $source)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment