Changing avatar should broadcast the profile via OMB.
This commit is contained in:
parent
c10fa99b04
commit
08901c98c4
|
@ -92,11 +92,23 @@ class GravatarPlugin extends Plugin
|
||||||
function onStartAvatarSaveForm($action) {
|
function onStartAvatarSaveForm($action) {
|
||||||
if ($action->arg('add')) {
|
if ($action->arg('add')) {
|
||||||
$result = $this->gravatar_save();
|
$result = $this->gravatar_save();
|
||||||
|
|
||||||
|
if($result['success']===true) {
|
||||||
|
common_broadcast_profile(common_current_user()->getProfile());
|
||||||
|
}
|
||||||
|
|
||||||
$action->showForm($result['message'], $result['success']);
|
$action->showForm($result['message'], $result['success']);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else if ($action->arg('remove')) {
|
} else if ($action->arg('remove')) {
|
||||||
$result = $this->gravatar_remove();
|
$result = $this->gravatar_remove();
|
||||||
|
|
||||||
|
if($result['success']===true) {
|
||||||
|
common_broadcast_profile(common_current_user()->getProfile());
|
||||||
|
}
|
||||||
|
|
||||||
$action->showForm($result['message'], $result['success']);
|
$action->showForm($result['message'], $result['success']);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user