summaryrefslogtreecommitdiff
path: root/lib/jabber.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jabber.php')
-rw-r--r--lib/jabber.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/jabber.php b/lib/jabber.php
index 5dde76f14..6479968b3 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -283,6 +283,15 @@ function jabber_public_notice($notice) {
# = false? I think not
if ($public && $notice->is_local) {
+ $profile = Profile::staticGet($notice->profile_id);
+
+ if (!$profile) {
+ common_log(LOG_WARNING, 'Refusing to broadcast notice with ' .
+ 'unknown profile ' . common_log_objstring($notice),
+ __FILE__);
+ return false;
+ }
+
$msg = jabber_format_notice($profile, $notice);
$entry = jabber_format_entry($profile, $notice);