Don't use push_to_groups for retractions
This commit is contained in:
parent
2b1724c42f
commit
e9377a681c
1 changed files with 8 additions and 1 deletions
|
|
@ -135,6 +135,13 @@ class User
|
||||||
push_to_people(post, target_people)
|
push_to_people(post, target_people)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def people_in_groups groups
|
||||||
|
people = []
|
||||||
|
groups.each{ |group|
|
||||||
|
people = people | group.people
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
def push_to_people(post, people)
|
def push_to_people(post, people)
|
||||||
people.each{|person|
|
people.each{|person|
|
||||||
salmon(post, :to => person)
|
salmon(post, :to => person)
|
||||||
|
|
@ -186,7 +193,7 @@ class User
|
||||||
post.unsocket_from_uid(self.id) if post.respond_to? :unsocket_from_uid
|
post.unsocket_from_uid(self.id) if post.respond_to? :unsocket_from_uid
|
||||||
retraction = Retraction.for(post)
|
retraction = Retraction.for(post)
|
||||||
retraction.creator_signature = retraction.sign_with_key( encryption_key )
|
retraction.creator_signature = retraction.sign_with_key( encryption_key )
|
||||||
push_to_groups retraction, groups_with_post(post.id).map!{|g| g.id}
|
push_to_people retraction, people_with_groups(groups_with_post(post.id))
|
||||||
retraction
|
retraction
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue