From f1d01a4e508f534d4f62645d7f4103fe6571dd71 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 27 Feb 2012 16:30:53 +0100 Subject: [PATCH] Facebook: Don't import empty messages --- facebook/facebook.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/facebook/facebook.php b/facebook/facebook.php index 6b6c7f84..c5f3a0b7 100755 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -1016,12 +1016,17 @@ function fb_consume_stream($uid,$j,$wall = false) { $datarray['private'] = 1; $datarray['allow_cid'] = '<' . $uid . '>'; } - + + if(trim($datarray['body']) == '') { + logger('facebook: empty body'); + continue; + } + $top_item = item_store($datarray); $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($top_item), intval($uid) - ); + ); if(count($r)) { $orig_post = $r[0]; logger('fb: new top level item posted');