From 39118293eb115a7ae13e9aad92c20fe9892d8590 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 17 Jun 2010 18:45:50 -0700 Subject: [PATCH] DG MS; fixed minor webhook bug when generating xml collection. --- app/controllers/dashboard_controller.rb | 4 ---- app/models/post.rb | 4 ++++ lib/common.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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