Merge pull request #4074 from L3MNcakes/feature/3975-send-profile-update
Issue #3976: Send a profile update alongside a sharing notification
This commit is contained in:
commit
af8485f47f
3 changed files with 14 additions and 1 deletions
|
|
@ -13,6 +13,7 @@
|
||||||
* Fix reshares in single post-view [#4056](https://github.com/diaspora/diaspora/issues/4056)
|
* Fix reshares in single post-view [#4056](https://github.com/diaspora/diaspora/issues/4056)
|
||||||
* Fix mobile view of deleted reshares. [#4063](https://github.com/diaspora/diaspora/issues/4063)
|
* Fix mobile view of deleted reshares. [#4063](https://github.com/diaspora/diaspora/issues/4063)
|
||||||
* Hide comment button in the mobile view when not signed in. [#4065](https://github.com/diaspora/diaspora/issues/4065)
|
* Hide comment button in the mobile view when not signed in. [#4065](https://github.com/diaspora/diaspora/issues/4065)
|
||||||
|
* Send profile alongside notification [#3976] (https://github.com/diaspora/diaspora/issues/3976)
|
||||||
|
|
||||||
## Refactor
|
## Refactor
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,16 @@ module User::Connecting
|
||||||
if notification = Notification.where(:target_id => person.id).first
|
if notification = Notification.where(:target_id => person.id).first
|
||||||
notification.update_attributes(:unread=>false)
|
notification.update_attributes(:unread=>false)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
deliver_profile_update
|
||||||
register_share_visibilities(contact)
|
register_share_visibilities(contact)
|
||||||
contact
|
contact
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def deliver_profile_update
|
||||||
|
Postzord::Dispatcher.build(self, profile).post
|
||||||
|
end
|
||||||
|
|
||||||
# This puts the last 100 public posts by the passed in contact into the user's stream.
|
# This puts the last 100 public posts by the passed in contact into the user's stream.
|
||||||
# @param [Contact] contact
|
# @param [Contact] contact
|
||||||
# @return [void]
|
# @return [void]
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,13 @@ describe User::Connecting do
|
||||||
contact.should_not_receive(:dispatch_request)
|
contact.should_not_receive(:dispatch_request)
|
||||||
alice.share_with(eve.person, a2)
|
alice.share_with(eve.person, a2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'posts profile' do
|
||||||
|
m = mock()
|
||||||
|
Postzord::Dispatcher.should_receive(:build).twice.and_return(m)
|
||||||
|
m.should_receive(:post).twice
|
||||||
|
alice.share_with(eve.person, alice.aspects.first)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets receiving' do
|
it 'sets receiving' do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue