Skip to content
Extraits de code Groupes Projets
Valider f91b6fa9 rédigé par Eugen Rochko's avatar Eugen Rochko
Parcourir les fichiers

Merge branch 'master' into development

parents 80e02b90 3caf0cfb
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -76,7 +76,7 @@ export function refreshNotificationsSuccess(notifications, next) { ...@@ -76,7 +76,7 @@ export function refreshNotificationsSuccess(notifications, next) {
type: NOTIFICATIONS_REFRESH_SUCCESS, type: NOTIFICATIONS_REFRESH_SUCCESS,
notifications, notifications,
accounts: notifications.map(item => item.account), accounts: notifications.map(item => item.account),
statuses: notifications.map(item => item.status), statuses: notifications.map(item => item.status).filter(status => !!status),
next next
}; };
}; };
...@@ -120,7 +120,7 @@ export function expandNotificationsSuccess(notifications, next) { ...@@ -120,7 +120,7 @@ export function expandNotificationsSuccess(notifications, next) {
type: NOTIFICATIONS_EXPAND_SUCCESS, type: NOTIFICATIONS_EXPAND_SUCCESS,
notifications, notifications,
accounts: notifications.map(item => item.account), accounts: notifications.map(item => item.account),
statuses: notifications.map(item => item.status), statuses: notifications.map(item => item.status).filter(status => !!status),
next next
}; };
}; };
......
...@@ -78,9 +78,10 @@ export default function accounts(state = initialState, action) { ...@@ -78,9 +78,10 @@ export default function accounts(state = initialState, action) {
case FAVOURITES_FETCH_SUCCESS: case FAVOURITES_FETCH_SUCCESS:
case COMPOSE_SUGGESTIONS_READY: case COMPOSE_SUGGESTIONS_READY:
case SEARCH_SUGGESTIONS_READY: case SEARCH_SUGGESTIONS_READY:
return normalizeAccounts(state, action.accounts);
case NOTIFICATIONS_REFRESH_SUCCESS: case NOTIFICATIONS_REFRESH_SUCCESS:
case NOTIFICATIONS_EXPAND_SUCCESS: case NOTIFICATIONS_EXPAND_SUCCESS:
return normalizeAccounts(state, action.accounts); return normalizeAccountsFromStatuses(normalizeAccounts(state, action.accounts), action.statuses);
case TIMELINE_REFRESH_SUCCESS: case TIMELINE_REFRESH_SUCCESS:
case TIMELINE_EXPAND_SUCCESS: case TIMELINE_EXPAND_SUCCESS:
case ACCOUNT_TIMELINE_FETCH_SUCCESS: case ACCOUNT_TIMELINE_FETCH_SUCCESS:
......
...@@ -28,4 +28,8 @@ class Favourite < ApplicationRecord ...@@ -28,4 +28,8 @@ class Favourite < ApplicationRecord
def target def target
thread thread
end end
before_validation do
self.status = status.reblog if status.reblog?
end
end end
...@@ -168,6 +168,7 @@ class Status < ApplicationRecord ...@@ -168,6 +168,7 @@ class Status < ApplicationRecord
before_validation do before_validation do
text.strip! text.strip!
self.reblog = reblog.reblog if reblog? && reblog.reblog?
self.in_reply_to_account_id = thread.account_id if reply? self.in_reply_to_account_id = thread.account_id if reply?
self.visibility = :public if visibility.nil? self.visibility = :public if visibility.nil?
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter