From 08901c98c4129c1d7707acb470e18f1056f2502e Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Thu, 10 Dec 2009 21:06:54 -0500 Subject: [PATCH] Changing avatar should broadcast the profile via OMB. --- plugins/Gravatar/GravatarPlugin.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/Gravatar/GravatarPlugin.php b/plugins/Gravatar/GravatarPlugin.php index b18f627266..3c61a682ed 100644 --- a/plugins/Gravatar/GravatarPlugin.php +++ b/plugins/Gravatar/GravatarPlugin.php @@ -92,11 +92,23 @@ class GravatarPlugin extends Plugin function onStartAvatarSaveForm($action) { if ($action->arg('add')) { $result = $this->gravatar_save(); + + if($result['success']===true) { + common_broadcast_profile(common_current_user()->getProfile()); + } + $action->showForm($result['message'], $result['success']); + return false; } else if ($action->arg('remove')) { $result = $this->gravatar_remove(); + + if($result['success']===true) { + common_broadcast_profile(common_current_user()->getProfile()); + } + $action->showForm($result['message'], $result['success']); + return false; } else { return true; -- 2.39.5