]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
forgot to get the profile in public queue handler
authorEvan Prodromou <evan@prodromou.name>
Sat, 30 Aug 2008 07:12:32 +0000 (03:12 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 30 Aug 2008 07:12:32 +0000 (03:12 -0400)
darcs-hash:20080830071232-84dde-90bad1be7a7e141927175e42d39cb21d7bba337e.gz

lib/jabber.php

index 5dde76f14e6720e44f046de3dd75ee4dcdb2cee3..6479968b30ffca20faebe2c13d4860ec250b81d2 100644 (file)
@@ -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);