don't dispatch photos twice ...
This commit is contained in:
parent
c75f92d07a
commit
ed10bea21f
2 changed files with 1 additions and 5 deletions
|
|
@ -73,11 +73,6 @@ class StatusMessagesController < ApplicationController
|
||||||
|
|
||||||
current_user.dispatch_post(@status_message, :url => short_post_url(@status_message.guid), :service_types => receiving_services)
|
current_user.dispatch_post(@status_message, :url => short_post_url(@status_message.guid), :service_types => receiving_services)
|
||||||
|
|
||||||
#this is done implicitly, somewhere else, but it doesnt work, says max. :'(
|
|
||||||
@status_message.photos.each do |photo|
|
|
||||||
current_user.dispatch_post(photo)
|
|
||||||
end
|
|
||||||
|
|
||||||
current_user.participate!(@status_message)
|
current_user.participate!(@status_message)
|
||||||
|
|
||||||
if coming_from_profile_page? && !own_profile_page? # if this is a post coming from a profile page
|
if coming_from_profile_page? && !own_profile_page? # if this is a post coming from a profile page
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@ class StatusMessage < Post
|
||||||
|
|
||||||
def update_and_dispatch_attached_photos(sender)
|
def update_and_dispatch_attached_photos(sender)
|
||||||
if self.photos.any?
|
if self.photos.any?
|
||||||
|
logger.info "dispatch photos for StatusMessage:#{guid}"
|
||||||
Photo.where(status_message_guid: guid).update_all(:public => self.public)
|
Photo.where(status_message_guid: guid).update_all(:public => self.public)
|
||||||
self.photos.each do |photo|
|
self.photos.each do |photo|
|
||||||
if photo.pending
|
if photo.pending
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue