about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-26 01:34:12 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-26 01:34:12 +0100
commitda4b675aca2c68e976d7920d3fc5b7e2881d1d86 (patch)
treefab8bd02e9d2584c2127f18275660093cb26cf93
parent43bb8a25e702badd4a98934e0e28e65190a1b7cb (diff)
Fix favourite handling in ProcessInteractionService
-rw-r--r--app/controllers/auth/sessions_controller.rb5
-rw-r--r--app/models/user.rb4
-rw-r--r--app/services/process_feed_service.rb7
-rw-r--r--app/services/process_interaction_service.rb2
4 files changed, 8 insertions, 10 deletions
diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb
index f02ce00c1..42b1d4ead 100644
--- a/app/controllers/auth/sessions_controller.rb
+++ b/app/controllers/auth/sessions_controller.rb
@@ -1,8 +1,3 @@
 class Auth::SessionsController < Devise::SessionsController
   layout 'auth'
-
-  def create
-    params[:user].merge!(remember_me: 1)
-    super
-  end
 end
diff --git a/app/models/user.rb b/app/models/user.rb
index a80efb50d..8b2cd22e0 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -11,4 +11,8 @@ class User < ActiveRecord::Base
   def admin?
     self.admin
   end
+
+  def remember_me
+    (super == nil) ? '1' : super
+  end
 end
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb
index 047d0e747..ba11fc4b1 100644
--- a/app/services/process_feed_service.rb
+++ b/app/services/process_feed_service.rb
@@ -61,6 +61,9 @@ class ProcessFeedService < BaseService
         end
       else
         # What to do about remote user?
+        # Are we supposed to do a search in the database by URL?
+        # We could technically open the URL, look for LRDD tags, get webfinger that way,
+        # finally acquire the acct:username@domain form, and then check DB
       end
     end
   end
@@ -176,8 +179,4 @@ class ProcessFeedService < BaseService
   def update_remote_profile_service
     @update_remote_profile_service ||= UpdateRemoteProfileService.new
   end
-
-  def fan_out_on_write_service
-    @fan_out_on_write_service ||= FanOutOnWriteService.new
-  end
 end
diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb
index fd27d667f..b7503ca6a 100644
--- a/app/services/process_interaction_service.rb
+++ b/app/services/process_interaction_service.rb
@@ -77,7 +77,7 @@ class ProcessInteractionService < BaseService
   end
 
   def activity_id(xml)
-    xml.at_xpath('./activity:object/xmlns:id').content
+    xml.at_xpath('//activity:object/xmlns:id').content
   end
 
   def salmon