Merge remote-tracking branch 'personal/merge/tootsuite/master' into gs-master

This commit is contained in:
David Yip 2018-01-05 17:31:56 -06:00
commit 03aeab857f
No known key found for this signature in database
GPG key ID: 7DA0036508FCC0CC
14 changed files with 69 additions and 10 deletions

View file

@ -21,9 +21,9 @@ class Api::V1::Instances::ActivityController < Api::BaseController
weeks << { weeks << {
week: week.to_time.to_i.to_s, week: week.to_time.to_i.to_s,
statuses: Redis.current.get("activity:statuses:local:#{week_id}") || 0, statuses: Redis.current.get("activity:statuses:local:#{week_id}") || '0',
logins: Redis.current.pfcount("activity:logins:#{week_id}"), logins: Redis.current.pfcount("activity:logins:#{week_id}").to_s,
registrations: Redis.current.get("activity:accounts:local:#{week_id}") || 0, registrations: Redis.current.get("activity:accounts:local:#{week_id}") || '0',
} }
end end

View file

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

View file

@ -46,6 +46,8 @@ class FetchAtomService < BaseService
json = body_to_json(@response.to_s) json = body_to_json(@response.to_s)
if supported_context?(json) && json['type'] == 'Person' && json['inbox'].present? if supported_context?(json) && json['type'] == 'Person' && json['inbox'].present?
[json['id'], { prefetched_body: @response.to_s, id: true }, :activitypub] [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 else
@unsupported_activity = true @unsupported_activity = true
nil nil

View file

@ -7,7 +7,7 @@
<p>Aprèp vòstra primièra connexion, poiretz accedir a la documentacion de laisina.</p> <p>Aprèp vòstra primièra connexion, poiretz accedir a la documentacion de laisina.</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> <p>Amistosament,</p>

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 laisina. Aprèp vòstra primièra connexion, poiretz accedir a la documentacion de laisina.
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, Amistosament,

View file

@ -0,0 +1,15 @@
<p>Bonjorn <%= @resource.email %>!</p>
<% if @resource&.unconfirmed_email? %>
<p>Vos contactem per vos senhalar que ladreça quutilizatz per <%= @instance %> es cambiada per aquesta daquí <%= @resource.unconfirmed_email %>.</p>
<% else %>
<p>Vos contactem per vos senhalar que ladreça quutilizatz per <%= @instance %> es cambiada per aquesta daquí <%= @resource.email %>.</p>
<% end %>
<p>
Savètz pas demandat aqueste cambiament dadreça, poiriá arribar que qualquun mai aguèsse agut accès a vòstre compte. Mercés de cambiar sulpic vòstre senhal o de contactar vòstre administrator dinstància se laccès a vòstre compte vos es barrat.
</p>
<p>Amistosament,<p>
<p>La còla <%= @instance %></p>

View file

@ -0,0 +1,13 @@
Bonjorn <%= @resource.email %>!
<% if @resource&.unconfirmed_email? %>
Vos contactem per vos senhalar que ladreça quutilizatz per <%= @instance %> es cambiada per aquesta daquí <%= @resource.unconfirmed_email %>.
<% else %>
Vos contactem per vos senhalar que ladreça quutilizatz per <%= @instance %> es cambiada per aquesta daquí <%= @resource.email %>.
<% end %>
Savètz pas demandat aqueste cambiament dadreça, poiriá arribar que qualquun mai aguèsse agut accès a vòstre compte. Mercés de cambiar sulpic vòstre senhal o de contactar vòstre administrator dinstància se laccès a vòstre compte vos es barrat.
Amistosament,
La còla <%= @instance %>

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 quutilizatz 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 dadreç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>

View file

@ -0,0 +1,12 @@
Bonjorn <%= @resource.unconfirmed_email %>!
Avètz demandat a cambiar vòstra adreça de corrièl quutilizatz 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 %>

View file

@ -20,7 +20,7 @@ class Pubsubhubbub::SubscribeWorker
sidekiq_retries_exhausted do |msg, _e| sidekiq_retries_exhausted do |msg, _e|
account = Account.find(msg['args'].first) 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) ::UnsubscribeService.new.call(account)
end end

View file

@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file. # 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')

View file

@ -2,7 +2,7 @@ const fs = require('fs');
const path = require('path'); const path = require('path');
const { default: manageTranslations } = require('react-intl-translations-manager'); 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 rootDirectory = path.resolve(__dirname, '..', '..');
const translationsDirectory = path.resolve(rootDirectory, 'app', 'javascript', 'mastodon', 'locales'); const translationsDirectory = path.resolve(rootDirectory, 'app', 'javascript', 'mastodon', 'locales');

View file

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

View file

@ -46,7 +46,7 @@ RSpec.configure do |config|
config.include ActiveSupport::Testing::TimeHelpers config.include ActiveSupport::Testing::TimeHelpers
config.before :each, type: :feature do 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')}" Capybara.app_host = "http#{https ? 's' : ''}://#{ENV.fetch('LOCAL_DOMAIN')}"
end end