]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Changing avatar should broadcast the profile via OMB.
authorEric Helgeson <erichelgeson@gmail.com>
Fri, 11 Dec 2009 02:06:54 +0000 (21:06 -0500)
committerEric Helgeson <erichelgeson@gmail.com>
Fri, 11 Dec 2009 02:07:47 +0000 (21:07 -0500)
plugins/Gravatar/GravatarPlugin.php

index b18f627266ae50dab223ced726d0464705b62708..3c61a682ed6e917d9ca6e22665d8dc608e9c77cf 100644 (file)
@@ -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;