about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2018-01-05 17:31:56 -0600
committerDavid Yip <yipdw@member.fsf.org>2018-01-05 17:31:56 -0600
commit03aeab857f0972e74910307f1a5954353eb70a28 (patch)
treeb0b6243ee40684a949cff440bb56dcad7eec8674 /app
parentf441770e50621ac59a7b022ee2127964935b2b8d (diff)
parentf6adb409fd8f4bf42c1da54cc1e7e42886612c14 (diff)
Merge remote-tracking branch 'personal/merge/tootsuite/master' into gs-master
Diffstat (limited to 'app')
-rw-r--r--app/controllers/api/v1/instances/activity_controller.rb6
-rw-r--r--app/javascript/mastodon/locales/whitelist_sr-Latn.json2
-rw-r--r--app/services/fetch_atom_service.rb2
-rw-r--r--app/views/user_mailer/confirmation_instructions.oc.html.erb2
-rw-r--r--app/views/user_mailer/confirmation_instructions.oc.text.erb2
-rw-r--r--app/views/user_mailer/email_changed.oc.html.erb15
-rw-r--r--app/views/user_mailer/email_changed.oc.text.erb13
-rw-r--r--app/views/user_mailer/reconfirmation_instructions.oc.html.erb15
-rw-r--r--app/views/user_mailer/reconfirmation_instructions.oc.text.erb12
-rw-r--r--app/workers/pubsubhubbub/subscribe_worker.rb2
10 files changed, 65 insertions, 6 deletions
diff --git a/app/controllers/api/v1/instances/activity_controller.rb b/app/controllers/api/v1/instances/activity_controller.rb
index 36f52c38d..e14e0aee8 100644
--- a/app/controllers/api/v1/instances/activity_controller.rb
+++ b/app/controllers/api/v1/instances/activity_controller.rb
@@ -21,9 +21,9 @@ class Api::V1::Instances::ActivityController < Api::BaseController
 
       weeks << {
         week: week.to_time.to_i.to_s,
-        statuses: Redis.current.get("activity:statuses:local:#{week_id}") || 0,
-        logins: Redis.current.pfcount("activity:logins:#{week_id}"),
-        registrations: Redis.current.get("activity:accounts:local:#{week_id}") || 0,
+        statuses: Redis.current.get("activity:statuses:local:#{week_id}") || '0',
+        logins: Redis.current.pfcount("activity:logins:#{week_id}").to_s,
+        registrations: Redis.current.get("activity:accounts:local:#{week_id}") || '0',
       }
     end
 
diff --git a/app/javascript/mastodon/locales/whitelist_sr-Latn.json b/app/javascript/mastodon/locales/whitelist_sr-Latn.json
new file mode 100644
index 000000000..0d4f101c7
--- /dev/null
+++ b/app/javascript/mastodon/locales/whitelist_sr-Latn.json
@@ -0,0 +1,2 @@
+[
+]
diff --git a/app/services/fetch_atom_service.rb b/app/services/fetch_atom_service.rb
index c01e8d071..c07859845 100644
--- a/app/services/fetch_atom_service.rb
+++ b/app/services/fetch_atom_service.rb
@@ -46,6 +46,8 @@ class FetchAtomService < BaseService
       json = body_to_json(@response.to_s)
       if supported_context?(json) && json['type'] == 'Person' && json['inbox'].present?
         [json['id'], { prefetched_body: @response.to_s, id: true }, :activitypub]
+      elsif supported_context?(json) && json['type'] == 'Note'
+        [json['id'], { prefetched_body: @response.to_s, id: true }, :activitypub]
       else
         @unsupported_activity = true
         nil
diff --git a/app/views/user_mailer/confirmation_instructions.oc.html.erb b/app/views/user_mailer/confirmation_instructions.oc.html.erb
index 7a16db67a..5657e40d4 100644
--- a/app/views/user_mailer/confirmation_instructions.oc.html.erb
+++ b/app/views/user_mailer/confirmation_instructions.oc.html.erb
@@ -7,7 +7,7 @@
 
 <p>Aprèp vòstra primièra connexion, poiretz accedir a la documentacion de l’aisina.</p>
 
-<p>Pensatz tanben de gaitar nòstras <%= link_to 'conditions d\'utilisation', terms_url %>.</p>
+<p>Pensatz tanben de gaitar nòstres <%= link_to 'tèrmes e condicions d\'utilizacion', terms_url %>.</p>
 
 <p>Amistosament,</p>
 
diff --git a/app/views/user_mailer/confirmation_instructions.oc.text.erb b/app/views/user_mailer/confirmation_instructions.oc.text.erb
index bf2acfec1..fe04fe3d0 100644
--- a/app/views/user_mailer/confirmation_instructions.oc.text.erb
+++ b/app/views/user_mailer/confirmation_instructions.oc.text.erb
@@ -7,7 +7,7 @@ er confirmar vòstra inscripcion, mercés de clicar sul ligam seguent : 
 
 Aprèp vòstra primièra connexion, poiretz accedir a la documentacion de l’aisina.
 
-Pensatz tanben de gaitar nòstras <%= link_to 'conditions d\'utilisation', terms_url %>.
+Pensatz tanben de gaitar nòstres <%= link_to 'tèrmes e condicions d\'utilizacion', terms_url %>.
 
 Amistosament,
 
diff --git a/app/views/user_mailer/email_changed.oc.html.erb b/app/views/user_mailer/email_changed.oc.html.erb
new file mode 100644
index 000000000..0f4c891dc
--- /dev/null
+++ b/app/views/user_mailer/email_changed.oc.html.erb
@@ -0,0 +1,15 @@
+<p>Bonjorn <%= @resource.email %> !</p>
+
+<% if @resource&.unconfirmed_email? %>
+  <p>Vos contactem per vos senhalar que l’adreça qu’utilizatz per <%= @instance %> es cambiada per aquesta d’aquí <%= @resource.unconfirmed_email %>.</p>
+<% else %>
+  <p>Vos contactem per vos senhalar que l’adreça qu’utilizatz per <%= @instance %> es cambiada per aquesta d’aquí <%= @resource.email %>.</p>
+<% end %>
+
+<p>
+  S’avètz pas demandat aqueste cambiament d’adreça, poiriá arribar que qualqu’un mai aguèsse agut accès a vòstre compte. Mercés de cambiar sulpic vòstre senhal o de contactar vòstre administrator d’instància se l’accès a vòstre compte vos es barrat.
+</p>
+
+<p>Amistosament,<p>
+
+<p>La còla <%= @instance %></p>
diff --git a/app/views/user_mailer/email_changed.oc.text.erb b/app/views/user_mailer/email_changed.oc.text.erb
new file mode 100644
index 000000000..2305ef834
--- /dev/null
+++ b/app/views/user_mailer/email_changed.oc.text.erb
@@ -0,0 +1,13 @@
+Bonjorn <%= @resource.email %> !
+
+<% if @resource&.unconfirmed_email? %>
+Vos contactem per vos senhalar que l’adreça qu’utilizatz per <%= @instance %> es cambiada per aquesta d’aquí <%= @resource.unconfirmed_email %>.
+<% else %>
+Vos contactem per vos senhalar que l’adreça qu’utilizatz per <%= @instance %> es cambiada per aquesta d’aquí <%= @resource.email %>.
+<% end %>
+
+S’avètz pas demandat aqueste cambiament d’adreça, poiriá arribar que qualqu’un mai aguèsse agut accès a vòstre compte. Mercés de cambiar sulpic vòstre senhal o de contactar vòstre administrator d’instància se l’accès a vòstre compte vos es barrat.
+
+Amistosament,
+
+La còla <%= @instance %>
diff --git a/app/views/user_mailer/reconfirmation_instructions.oc.html.erb b/app/views/user_mailer/reconfirmation_instructions.oc.html.erb
new file mode 100644
index 000000000..d5404e49c
--- /dev/null
+++ b/app/views/user_mailer/reconfirmation_instructions.oc.html.erb
@@ -0,0 +1,15 @@
+<p>Bonjorn <%= @resource.unconfirmed_email %> !</p>
+
+<p>Avètz demandat a cambiar vòstra adreça de corrièl qu’utilizatz per <%= @instance %>.</p>
+
+<p>Per confirmar vòstra novèla adreça, mercés de clicar lo ligam seguent :<br>
+<%= link_to 'Confirmar mon adreça', confirmation_url(@resource, confirmation_token: @token) %></p>
+
+<p>Se lo ligam al dessús fonciona pas, copiatz e pegatz aquesta URL a la barra d’adreça :<br>
+<span><%= confirmation_url(@resource, confirmation_token: @token) %></span>
+
+<p>Mercés de gaitar tanben nòstres <%= link_to 'terms and conditions', terms_url %>.</p>
+
+<p>Amistosament,<p>
+
+<p>La còla <%= @instance %></p>
diff --git a/app/views/user_mailer/reconfirmation_instructions.oc.text.erb b/app/views/user_mailer/reconfirmation_instructions.oc.text.erb
new file mode 100644
index 000000000..6f174bb3e
--- /dev/null
+++ b/app/views/user_mailer/reconfirmation_instructions.oc.text.erb
@@ -0,0 +1,12 @@
+Bonjorn <%= @resource.unconfirmed_email %> !
+
+Avètz demandat a cambiar vòstra adreça de corrièl qu’utilizatz per <%= @instance %>.
+
+Per confirmar vòstra novèla adreça, mercés de clicar lo ligam seguent :
+<%= confirmation_url(@resource, confirmation_token: @token) %>
+
+Mercés tanben de gaitar nòstres <%= link_to 'terms and conditions', terms_url %>.
+
+Amistosament,
+
+La còla <%= @instance %>
diff --git a/app/workers/pubsubhubbub/subscribe_worker.rb b/app/workers/pubsubhubbub/subscribe_worker.rb
index e350973e1..2e176d1c1 100644
--- a/app/workers/pubsubhubbub/subscribe_worker.rb
+++ b/app/workers/pubsubhubbub/subscribe_worker.rb
@@ -20,7 +20,7 @@ class Pubsubhubbub::SubscribeWorker
 
   sidekiq_retries_exhausted do |msg, _e|
     account = Account.find(msg['args'].first)
-    logger.error "PuSH subscription attempts for #{account.acct} exhausted. Unsubscribing"
+    Sidekiq.logger.error "PuSH subscription attempts for #{account.acct} exhausted. Unsubscribing"
     ::UnsubscribeService.new.call(account)
   end