about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-10-31 11:15:37 +0100
committerGitHub <noreply@github.com>2018-10-31 11:15:37 +0100
commita78ec63afa100a25494427ac3695e51e99520c2b (patch)
tree28f8a4165549a8406abf791a31d05f53a73f051f /app
parent2b2facbbdfb7c0b53e38048e932143d592af401e (diff)
parent75b48dc1771f805f43c9dd2d55fc32ccf8951d68 (diff)
Merge pull request #803 from ThibG/glitch-soc/merge-upstream
Merge upstream changes (v2.6.1)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/locales/oc.json14
-rw-r--r--app/javascript/mastodon/reducers/conversations.js2
-rw-r--r--app/services/fetch_atom_service.rb10
3 files changed, 12 insertions, 14 deletions
diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json
index 93ab4be7d..5df64e192 100644
--- a/app/javascript/mastodon/locales/oc.json
+++ b/app/javascript/mastodon/locales/oc.json
@@ -90,9 +90,9 @@
   "confirmations.mute.confirm": "Rescondre",
   "confirmations.mute.message": "Volètz vertadièrament rescondre {name} ?",
   "confirmations.redraft.confirm": "Escafar & tornar formular",
-  "confirmations.redraft.message": "Volètz vertadièrament escafar aqueste estatut e lo reformular ? Tote sos partiments e favorits seràn perduts, e sas responsas seràn orfanèlas.",
+  "confirmations.redraft.message": "Volètz vertadièrament escafar aqueste estatut e lo reformular ? Totes sos partiments e favorits seràn perduts, e sas responsas seràn orfanèlas.",
   "confirmations.reply.confirm": "Respondre",
-  "confirmations.reply.message": "Respondre remplaçarà lo messatge que sètz a escriure. Volètz vertadièrament contunhar ?",
+  "confirmations.reply.message": "Respondre remplaçarà lo messatge que sètz a escriure. Volètz vertadièrament contunhar ?",
   "confirmations.unfollow.confirm": "Quitar de sègre",
   "confirmations.unfollow.message": "Volètz vertadièrament quitar de sègre {name} ?",
   "embed.instructions": "Embarcar aqueste estatut per lo far veire sus un site Internet en copiar lo còdi çai-jos.",
@@ -115,8 +115,8 @@
   "empty_column.community": "Lo flux public local es void. Escrivètz quicòm per lo garnir !",
   "empty_column.direct": "Avètz pas encara cap de messatges. Quand ne mandatz un o que ne recebètz un, serà mostrat aquí.",
   "empty_column.domain_blocks": "I a pas encara cap de domeni amagat.",
-  "empty_column.favourited_statuses": "Avètz pas encara cap de tut favorit. Quanda n’auretz un, apareisserà  aquí.",
-  "empty_column.favourites": "Degun a pas encara mes en favorit aqueste tut. Quanda qualqu’un o farà, apareisserà  aquí.",
+  "empty_column.favourited_statuses": "Avètz pas encara cap de tut favorit. Quand n’auretz un, apareisserà aquí.",
+  "empty_column.favourites": "Degun a pas encara mes en favorit aqueste tut. Quand qualqu’un o farà, apareisserà aquí.",
   "empty_column.follow_requests": "Avètz pas encara de demanda d’abonament. Quand n’auretz una apareisserà aquí.",
   "empty_column.hashtag": "I a pas encara de contengut ligat a aquesta etiqueta.",
   "empty_column.home": "Vòstre flux d’acuèlh es void. Visitatz {public} o utilizatz la recèrca per vos connectar a d’autras personas.",
@@ -129,7 +129,7 @@
   "follow_request.authorize": "Acceptar",
   "follow_request.reject": "Regetar",
   "getting_started.developers": "Desvelopaires",
-  "getting_started.documentation": "Documentation",
+  "getting_started.documentation": "Documentacion",
   "getting_started.find_friends": "Trobar d’amics de Twitter",
   "getting_started.heading": "Per començar",
   "getting_started.invite": "Convidar de monde",
@@ -145,7 +145,7 @@
   "keyboard_shortcuts.column": "centrar un estatut a una colomna",
   "keyboard_shortcuts.compose": "anar al camp tèxte",
   "keyboard_shortcuts.description": "Descripcion",
-  "keyboard_shortcuts.direct": "per dobrir la columna de messatges dirèctes",
+  "keyboard_shortcuts.direct": "per dobrir la colomna de messatges dirèctes",
   "keyboard_shortcuts.down": "far davalar dins la lista",
   "keyboard_shortcuts.enter": "dobrir los estatuts",
   "keyboard_shortcuts.favourite": "apondre als favorits",
@@ -159,7 +159,7 @@
   "keyboard_shortcuts.mention": "mencionar l’autor",
   "keyboard_shortcuts.muted": "per dobrir la lista dels utilizaires silenciats",
   "keyboard_shortcuts.my_profile": "per dobrir vòstre perfil",
-  "keyboard_shortcuts.notifications": "per dobrir la columna de notificacions",
+  "keyboard_shortcuts.notifications": "per dobrir la colomna de notificacions",
   "keyboard_shortcuts.pinned": "per dobrir la lista dels tuts penjats",
   "keyboard_shortcuts.profile": "per dobrir lo perfil de l’autor",
   "keyboard_shortcuts.reply": "respondre",
diff --git a/app/javascript/mastodon/reducers/conversations.js b/app/javascript/mastodon/reducers/conversations.js
index ea39fccee..b13a9fdf4 100644
--- a/app/javascript/mastodon/reducers/conversations.js
+++ b/app/javascript/mastodon/reducers/conversations.js
@@ -21,7 +21,7 @@ const conversationToMap = item => ImmutableMap({
   id: item.id,
   unread: item.unread,
   accounts: ImmutableList(item.accounts.map(a => a.id)),
-  last_status: item.last_status.id,
+  last_status: item.last_status ? item.last_status.id : null,
 });
 
 const updateConversation = (state, item) => state.update('items', list => {
diff --git a/app/services/fetch_atom_service.rb b/app/services/fetch_atom_service.rb
index b6c6cdd1c..550e75f33 100644
--- a/app/services/fetch_atom_service.rb
+++ b/app/services/fetch_atom_service.rb
@@ -29,7 +29,7 @@ class FetchAtomService < BaseService
 
   def perform_request(&block)
     accept = 'text/html'
-    accept = 'application/activity+json, application/ld+json; profile="https://www.w3.org/ns/activitystreams", application/atom+xml, ' + accept unless @unsupported_activity
+    accept = 'application/activity+json, application/ld+json, application/atom+xml, ' + accept unless @unsupported_activity
 
     Request.new(:get, @url).add_headers('Accept' => accept).perform(&block)
   end
@@ -37,11 +37,9 @@ class FetchAtomService < BaseService
   def process_response(response, terminal = false)
     return nil if response.code != 200
 
-    response_type = response.headers['Content-type']
-
-    if response_type == 'application/atom+xml'
+    if response.mime_type == 'application/atom+xml'
       [@url, { prefetched_body: response.body_with_limit }, :ostatus]
-    elsif ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].include?(response_type)
+    elsif ['application/activity+json', 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'].include?(response.mime_type)
       body = response.body_with_limit
       json = body_to_json(body)
       if supported_context?(json) && equals_or_includes_any?(json['type'], ActivityPub::FetchRemoteAccountService::SUPPORTED_TYPES) && json['inbox'].present?
@@ -57,7 +55,7 @@ class FetchAtomService < BaseService
 
       if link_header&.find_link(%w(rel alternate))
         process_link_headers(link_header)
-      elsif response_type == 'text/html'
+      elsif response.mime_type == 'text/html'
         process_html(response)
       end
     end