summaryrefslogtreecommitdiff
path: root/plugins/OStatus/classes/FeedSub.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus/classes/FeedSub.php')
-rw-r--r--plugins/OStatus/classes/FeedSub.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php
index bf9d063fa..31241d3de 100644
--- a/plugins/OStatus/classes/FeedSub.php
+++ b/plugins/OStatus/classes/FeedSub.php
@@ -372,6 +372,12 @@ class FeedSub extends Memcached_DataObject
* feed (as a DOMDocument) will be passed to the StartFeedSubHandleFeed
* and EndFeedSubHandleFeed events for processing.
*
+ * Not guaranteed to be running in an immediate POST context; may be run
+ * from a queue handler.
+ *
+ * Side effects: the feedsub record's lastupdate field will be updated
+ * to the current time (not published time) if we got a legit update.
+ *
* @param string $post source of Atom or RSS feed
* @param string $hmac X-Hub-Signature header, if present
*/
@@ -402,6 +408,10 @@ class FeedSub extends Memcached_DataObject
return;
}
+ $orig = clone($this);
+ $this->last_update = common_sql_now();
+ $this->update($orig);
+
Event::handle('StartFeedSubReceive', array($this, $feed));
Event::handle('EndFeedSubReceive', array($this, $feed));
}