diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-08-30 03:12:32 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-08-30 03:12:32 -0400 |
commit | 19147201c8cc8c91e41569203fac5c85cdfbf350 (patch) | |
tree | e7ca5c27fe12e1eda5e249a4b5dc656aca91cf0e | |
parent | 336812b8453e910faa3091e2eb488035d3aa9017 (diff) |
forgot to get the profile in public queue handler
darcs-hash:20080830071232-84dde-90bad1be7a7e141927175e42d39cb21d7bba337e.gz
-rw-r--r-- | lib/jabber.php | 9 |
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); |