aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-28 21:49:13 -0700
committerfriendica <info@friendica.com>2014-08-28 21:49:13 -0700
commit8a62b824f98ca55c94a2fc04afbea0c118d44486 (patch)
tree728a14a58e2401696bf6fd5e4f53fef809f46438 /include/zot.php
parent95def2a247eca54a52744e405e837d5810cca83d (diff)
downloadvolse-hubzilla-8a62b824f98ca55c94a2fc04afbea0c118d44486.tar.gz
volse-hubzilla-8a62b824f98ca55c94a2fc04afbea0c118d44486.tar.bz2
volse-hubzilla-8a62b824f98ca55c94a2fc04afbea0c118d44486.zip
lots of little Diaspora issues
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/zot.php b/include/zot.php
index 54efe1343..8627656c2 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1595,12 +1595,13 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false) {
$arr['aid'] = $channel['channel_account_id'];
$arr['uid'] = $channel['channel_id'];
$item_result = item_store($arr);
- $item_id = $item_result['item_id'];
- $parr = array('item_id' => $item_id,'item' => $arr,'sender' => $sender,'channel' => $channel);
- call_hooks('activity_received',$parr);
-
- add_source_route($item_id,$sender['hash']);
-
+ $item_id = 0;
+ if($item_result['success']) {
+ $item_id = $item_result['item_id'];
+ $parr = array('item_id' => $item_id,'item' => $arr,'sender' => $sender,'channel' => $channel);
+ call_hooks('activity_received',$parr);
+ add_source_route($item_id,$sender['hash']);
+ }
$result[] = array($d['hash'],(($item_id) ? 'posted' : 'storage failed:' . $item_result['message']),$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>',$arr['mid']);
}