Loading Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ Contributions are very welcome, the hard work is done! * Attached ShareVisibilities to the User, not the Contact [#6723](https://github.com/diaspora/diaspora/pull/6723) * Refactor mentions input, now based on typeahead.js [#6728](https://github.com/diaspora/diaspora/pull/6728) * Optimized the pod up checks [#6727](https://github.com/diaspora/diaspora/pull/6727) * Prune and do not create aspect visibilities for public posts [#6732](https://github.com/diaspora/diaspora/pull/6732) ## Bug fixes * Destroy Participation when removing interactions with a post [#5852](https://github.com/diaspora/diaspora/pull/5852) Loading app/controllers/photos_controller.rb +4 −2 Original line number Diff line number Diff line Loading @@ -150,10 +150,12 @@ class PhotosController < ApplicationController @photo = current_user.build_post(:photo, params[:photo]) if @photo.save aspects = current_user.aspects_from_ids(params[:photo][:aspect_ids]) unless @photo.pending unless @photo.public? aspects = current_user.aspects_from_ids(params[:photo][:aspect_ids]) current_user.add_to_streams(@photo, aspects) end current_user.dispatch_post(@photo, :to => params[:photo][:aspect_ids]) end Loading app/controllers/reshares_controller.rb +0 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ class ResharesController < ApplicationController end if @reshare.save current_user.add_to_streams(@reshare, current_user.aspects) current_user.dispatch_post(@reshare, :url => post_url(@reshare), :additional_subscribers => @reshare.root_author) render :json => ExtremePostPresenter.new(@reshare, current_user), :status => 201 else Loading app/models/user/querying.rb +4 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,10 @@ module User::Querying query = opts[:klass].where(conditions) unless opts[:all_aspects?] query = query.joins(:aspect_visibilities).where(aspect_visibilities: {aspect_id: opts[:by_members_of]}) query = query.with_aspects.where( AspectVisibility.arel_table[:aspect_id].in(opts[:by_members_of]) .or(opts[:klass].arel_table[:public].eq(true)) ) end ugly_select_clause(query, opts) Loading app/services/status_message_creation_service.rb +2 −2 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ class StatusMessageCreationService end def destination_aspect_ids(params, user) if params[:status_message][:public] || params[:status_message][:aspect_ids].first == "all_aspects" if params[:status_message][:aspect_ids].first == "all_aspects" user.aspect_ids else elsif !params[:status_message][:public] params[:aspect_ids] end end Loading Loading
Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ Contributions are very welcome, the hard work is done! * Attached ShareVisibilities to the User, not the Contact [#6723](https://github.com/diaspora/diaspora/pull/6723) * Refactor mentions input, now based on typeahead.js [#6728](https://github.com/diaspora/diaspora/pull/6728) * Optimized the pod up checks [#6727](https://github.com/diaspora/diaspora/pull/6727) * Prune and do not create aspect visibilities for public posts [#6732](https://github.com/diaspora/diaspora/pull/6732) ## Bug fixes * Destroy Participation when removing interactions with a post [#5852](https://github.com/diaspora/diaspora/pull/5852) Loading
app/controllers/photos_controller.rb +4 −2 Original line number Diff line number Diff line Loading @@ -150,10 +150,12 @@ class PhotosController < ApplicationController @photo = current_user.build_post(:photo, params[:photo]) if @photo.save aspects = current_user.aspects_from_ids(params[:photo][:aspect_ids]) unless @photo.pending unless @photo.public? aspects = current_user.aspects_from_ids(params[:photo][:aspect_ids]) current_user.add_to_streams(@photo, aspects) end current_user.dispatch_post(@photo, :to => params[:photo][:aspect_ids]) end Loading
app/controllers/reshares_controller.rb +0 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ class ResharesController < ApplicationController end if @reshare.save current_user.add_to_streams(@reshare, current_user.aspects) current_user.dispatch_post(@reshare, :url => post_url(@reshare), :additional_subscribers => @reshare.root_author) render :json => ExtremePostPresenter.new(@reshare, current_user), :status => 201 else Loading
app/models/user/querying.rb +4 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,10 @@ module User::Querying query = opts[:klass].where(conditions) unless opts[:all_aspects?] query = query.joins(:aspect_visibilities).where(aspect_visibilities: {aspect_id: opts[:by_members_of]}) query = query.with_aspects.where( AspectVisibility.arel_table[:aspect_id].in(opts[:by_members_of]) .or(opts[:klass].arel_table[:public].eq(true)) ) end ugly_select_clause(query, opts) Loading
app/services/status_message_creation_service.rb +2 −2 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ class StatusMessageCreationService end def destination_aspect_ids(params, user) if params[:status_message][:public] || params[:status_message][:aspect_ids].first == "all_aspects" if params[:status_message][:aspect_ids].first == "all_aspects" user.aspect_ids else elsif !params[:status_message][:public] params[:aspect_ids] end end Loading