From d9089213fb8193b7c512b2edb0f11b3684fb4089 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 15 May 2012 10:54:48 +0200 Subject: [PATCH] SN apply debugging info to the log as for Twitter --- statusnet/statusnet.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/statusnet/statusnet.php b/statusnet/statusnet.php index 469b3ab8..3b189932 100755 --- a/statusnet/statusnet.php +++ b/statusnet/statusnet.php @@ -489,9 +489,14 @@ function statusnet_post_hook(&$a,&$b) { $msg = implode(' ', $e); $msg .= '... ' . $shortlink; } - // and now tweet it :-) - if(strlen($msg)) - $dent->post('statuses/update', array('status' => $msg)); + // and now dent it :-) + if(strlen($msg)) { + $result = $dent->post('statuses/update', array('status' => $msg)); + logger('statusnet_post send, result: ' . print_r($result, true), LOGGER_DEBUG); + if ($result->error) { + logger('Send to StatusNet failed: "' . $result->error . '"'); + } + } } }