about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-28 19:24:49 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-28 19:24:49 +0100
commit3ba6531611458dfe6c6538c27eec394e92d0fd75 (patch)
tree5ed151231ae2873ad0d890a1e56831d47abfb5d1 /app
parent50638174c89a1a953359781e7c0749aed0ef7b2d (diff)
Fix setting of confirmed=true on successful confirmation
Diffstat (limited to 'app')
-rw-r--r--app/controllers/admin/pubsubhubbub_controller.rb2
-rw-r--r--app/workers/pubsubhubbub/confirmation_worker.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/admin/pubsubhubbub_controller.rb b/app/controllers/admin/pubsubhubbub_controller.rb
index fae05bf9d..7e6bc75ea 100644
--- a/app/controllers/admin/pubsubhubbub_controller.rb
+++ b/app/controllers/admin/pubsubhubbub_controller.rb
@@ -6,6 +6,6 @@ class Admin::PubsubhubbubController < ApplicationController
   layout 'public'
 
   def index
-    @subscriptions = Subscription.includes(:account).paginate(page: params[:page], per_page: 40)
+    @subscriptions = Subscription.order('id desc').includes(:account).paginate(page: params[:page], per_page: 40)
   end
 end
diff --git a/app/workers/pubsubhubbub/confirmation_worker.rb b/app/workers/pubsubhubbub/confirmation_worker.rb
index 24e1185d4..b852970a9 100644
--- a/app/workers/pubsubhubbub/confirmation_worker.rb
+++ b/app/workers/pubsubhubbub/confirmation_worker.rb
@@ -10,6 +10,7 @@ class Pubsubhubbub::ConfirmationWorker
 
     subscription.secret        = secret
     subscription.lease_seconds = lease_seconds
+    subscription.confirmed     = true
 
     response = HTTP.headers(user_agent: 'Mastodon/PubSubHubbub')
                    .timeout(:per_operation, write: 20, connect: 20, read: 50)