diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index 91eff3cac..7196b7fb5 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -10,10 +10,6 @@ class DashboardController < ApplicationController
def receive
store_posts_from_xml (params[:xml])
-
-
-
- puts "holy boner batman"
render :nothing => true
end
end
diff --git a/app/models/post.rb b/app/models/post.rb
index be9ff1591..95985d170 100644
--- a/app/models/post.rb
+++ b/app/models/post.rb
@@ -31,6 +31,10 @@ class Post
query.order_by( [:created_at, :desc] )
end
+ def each
+ yield self
+ end
+
protected
diff --git a/lib/common.rb b/lib/common.rb
index 7b9538e88..4a64c570c 100644
--- a/lib/common.rb
+++ b/lib/common.rb
@@ -8,7 +8,7 @@ module Diaspora
@@queue = MessageHandler.new
def notify_friends
- xml = prep_webhook
+ xml = Post.build_xml_for(self)
@@queue.add_post_request( friends_with_permissions, xml )
@@queue.process
end
@@ -18,7 +18,7 @@ module Diaspora
end
def prep_many
- "#{self.to_xml.to_s}"
+ "#{self.prep_webhook}"
end
def friends_with_permissions