From 6c31867345ad869facc068c487db4164e0f5c6a9 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Thu, 19 May 2011 12:40:05 -0700 Subject: [PATCH] check for AS object in partial hack --- app/models/post.rb | 4 ++++ app/views/shared/_stream_element.html.haml | 2 +- app/views/shared/_stream_element.mobile.haml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index f6b88c89e..1458f4da9 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -107,5 +107,9 @@ class Post < ActiveRecord::Base Rails.logger.info("event=receive payload_type=#{self.class} update=true status=abort sender=#{self.diaspora_handle} reason='update not from post owner' existing_post=#{self.id}") end end + + def activity_streams? + false + end end diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index 6f074b1f0..a332c0af9 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -23,7 +23,7 @@ = person_link(post.author, :class => 'author') %time.time.timeago{:datetime => post.created_at, :integer => time_for_sort(post).to_i} - - if post.respond_to?(:activity_streams?) + - if post.activity_streams? = image_tag post.image_url - else = render 'status_messages/status_message', :post => post, :photos => post.photos diff --git a/app/views/shared/_stream_element.mobile.haml b/app/views/shared/_stream_element.mobile.haml index 54f9e6ab7..eed5a67dc 100644 --- a/app/views/shared/_stream_element.mobile.haml +++ b/app/views/shared/_stream_element.mobile.haml @@ -9,7 +9,7 @@ .from = person_link(post.author) - - if post.respond_to?(:activity_streams?) + - if post.activity_streams? = image_tag post.image_url - else = render 'status_messages/status_message', :post => post, :photos => post.photos