summaryrefslogtreecommitdiff
path: root/scripts/xmppdaemon.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-10-04 16:16:52 -0700
committerBrion Vibber <brion@pobox.com>2009-10-04 16:16:52 -0700
commit4462a1c63600fa83d2692ac2de8067b12b1eeac9 (patch)
treea946b98184eb32b5be4bf64e67357c06e8d0f65d /scripts/xmppdaemon.php
parent9235c1437e542d2b565d2d2d36fe2b7561e4d5f7 (diff)
parent2f065d687dc76bfbac3e1b7b3dcccf544f4b4987 (diff)
Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x
Diffstat (limited to 'scripts/xmppdaemon.php')
-rwxr-xr-xscripts/xmppdaemon.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index 1b1aec3e6..b2efc07c3 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -323,12 +323,15 @@ class XMPPDaemon extends Daemon
mb_strlen($content_shortened)));
return;
}
- $notice = Notice::saveNew($user->id, $content_shortened, 'xmpp');
- if (is_string($notice)) {
- $this->log(LOG_ERR, $notice);
- $this->from_site($user->jabber, $notice);
+
+ try {
+ $notice = Notice::saveNew($user->id, $content_shortened, 'xmpp');
+ } catch (Exception $e) {
+ $this->log(LOG_ERR, $e->getMessage());
+ $this->from_site($user->jabber, $e->getMessage());
return;
}
+
common_broadcast_notice($notice);
$this->log(LOG_INFO,
'Added notice ' . $notice->id . ' from user ' . $user->nickname);