Browse Source

Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master

closed-social-glitch-2
Jenkins 6 years ago
parent
commit
f6adb409fd
14 changed files with 69 additions and 10 deletions
  1. +3
    -3
      app/controllers/api/v1/instances/activity_controller.rb
  2. +2
    -0
      app/javascript/mastodon/locales/whitelist_sr-Latn.json
  3. +2
    -0
      app/services/fetch_atom_service.rb
  4. +1
    -1
      app/views/user_mailer/confirmation_instructions.oc.html.erb
  5. +1
    -1
      app/views/user_mailer/confirmation_instructions.oc.text.erb
  6. +15
    -0
      app/views/user_mailer/email_changed.oc.html.erb
  7. +13
    -0
      app/views/user_mailer/email_changed.oc.text.erb
  8. +15
    -0
      app/views/user_mailer/reconfirmation_instructions.oc.html.erb
  9. +12
    -0
      app/views/user_mailer/reconfirmation_instructions.oc.text.erb
  10. +1
    -1
      app/workers/pubsubhubbub/subscribe_worker.rb
  11. +1
    -1
      config/initializers/session_store.rb
  12. +1
    -1
      config/webpack/translationRunner.js
  13. +1
    -1
      lib/mastodon/version.rb
  14. +1
    -1
      spec/rails_helper.rb

+ 3
- 3
app/controllers/api/v1/instances/activity_controller.rb View File

@ -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

+ 2
- 0
app/javascript/mastodon/locales/whitelist_sr-Latn.json View File

@ -0,0 +1,2 @@
[
]

+ 2
- 0
app/services/fetch_atom_service.rb View File

@ -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

+ 1
- 1
app/views/user_mailer/confirmation_instructions.oc.html.erb View File

@ -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>

+ 1
- 1
app/views/user_mailer/confirmation_instructions.oc.text.erb View File

@ -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,

+ 15
- 0
app/views/user_mailer/email_changed.oc.html.erb View File

@ -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>

+ 13
- 0
app/views/user_mailer/email_changed.oc.text.erb View File

@ -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 %>

+ 15
- 0
app/views/user_mailer/reconfirmation_instructions.oc.html.erb View File

@ -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>

+ 12
- 0
app/views/user_mailer/reconfirmation_instructions.oc.text.erb View File

@ -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 %>

+ 1
- 1
app/workers/pubsubhubbub/subscribe_worker.rb View File

@ -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

+ 1
- 1
config/initializers/session_store.rb View File

@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_mastodon_session', secure: (ENV['LOCAL_HTTPS'] == 'true')
Rails.application.config.session_store :cookie_store, key: '_mastodon_session', secure: (Rails.env.production? || ENV['LOCAL_HTTPS'] == 'true')

+ 1
- 1
config/webpack/translationRunner.js View File

@ -2,7 +2,7 @@ const fs = require('fs');
const path = require('path');
const { default: manageTranslations } = require('react-intl-translations-manager');
const RFC5646_REGEXP = /^[a-z]{2,3}(?:|-[A-Z]+)$/;
const RFC5646_REGEXP = /^[a-z]{2,3}(?:-(?:x|[A-Za-z]{2,4}))*$/;
const rootDirectory = path.resolve(__dirname, '..', '..');
const translationsDirectory = path.resolve(rootDirectory, 'app', 'javascript', 'mastodon', 'locales');

+ 1
- 1
lib/mastodon/version.rb View File

@ -13,7 +13,7 @@ module Mastodon
end
def patch
1
2
end
def pre

+ 1
- 1
spec/rails_helper.rb View File

@ -46,7 +46,7 @@ RSpec.configure do |config|
config.include ActiveSupport::Testing::TimeHelpers
config.before :each, type: :feature do
https = ENV['LOCAL_HTTPS'] == 'true'
https = Rails.env.production? || ENV['LOCAL_HTTPS'] == 'true'
Capybara.app_host = "http#{https ? 's' : ''}://#{ENV.fetch('LOCAL_DOMAIN')}"
end

Loading…
Cancel
Save