summaryrefslogtreecommitdiff
path: root/plugins/OStatus/classes/FeedSub.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-22 01:23:24 -0800
committerZach Copley <zach@status.net>2010-02-22 01:23:24 -0800
commit35be39e30eacda1b0425a2ae9f8e58cd0867d157 (patch)
treedf86f17a666e5d0bb775dbcef0fc4eb5b1c777f3 /plugins/OStatus/classes/FeedSub.php
parent47300a2ae9a51108fbf59a57cf5ab6e8867b54a6 (diff)
parent17ed30dffc1c05259baf2f0387089547e39684d7 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'plugins/OStatus/classes/FeedSub.php')
-rw-r--r--plugins/OStatus/classes/FeedSub.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php
index 31241d3de..b848b6b1d 100644
--- a/plugins/OStatus/classes/FeedSub.php
+++ b/plugins/OStatus/classes/FeedSub.php
@@ -291,10 +291,9 @@ class FeedSub extends Memcached_DataObject
$headers = array('Content-Type: application/x-www-form-urlencoded');
$post = array('hub.mode' => $mode,
'hub.callback' => $callback,
- 'hub.verify' => 'async',
+ 'hub.verify' => 'sync',
'hub.verify_token' => $this->verify_token,
'hub.secret' => $this->secret,
- //'hub.lease_seconds' => 0,
'hub.topic' => $this->uri);
$client = new HTTPClient();
$response = $client->post($this->huburi, $headers, $post);
@@ -317,8 +316,8 @@ class FeedSub extends Memcached_DataObject
common_log(LOG_ERR, __METHOD__ . ": error \"{$e->getMessage()}\" hitting hub $this->huburi subscribing to $this->uri");
$orig = clone($this);
- $this->verify_token = null;
- $this->sub_state = null;
+ $this->verify_token = '';
+ $this->sub_state = 'inactive';
$this->update($orig);
unset($orig);
@@ -343,7 +342,7 @@ class FeedSub extends Memcached_DataObject
} else {
$this->sub_end = null;
}
- $this->lastupdate = common_sql_now();
+ $this->modified = common_sql_now();
return $this->update($original);
}
@@ -362,7 +361,7 @@ class FeedSub extends Memcached_DataObject
$this->sub_state = '';
$this->sub_start = '';
$this->sub_end = '';
- $this->lastupdate = common_sql_now();
+ $this->modified = common_sql_now();
return $this->update($original);
}