Skip to content
Extraits de code Groupes Projets
Valider 3b06184d rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

Merge pull request #4398 from movilla/deleted_reshared_mobile

Mobile Error 500 if a reshared (original) post will be deleted.

Conflicts:
	Changelog.md
parents 30778ffb 795a7a57
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
* Remove placeholders for name fields in settings (no more Sofaer) [#4385](https://github.com/diaspora/diaspora/pull/4385) * Remove placeholders for name fields in settings (no more Sofaer) [#4385](https://github.com/diaspora/diaspora/pull/4385)
* Problems with layout the registration page for mobile. [#4396](https://github.com/diaspora/diaspora/issues/4396) * Problems with layout the registration page for mobile. [#4396](https://github.com/diaspora/diaspora/issues/4396)
* Do not display photos in the background in the SPV [#4407](https://github.com/diaspora/diaspora/pull/4407) * Do not display photos in the background in the SPV [#4407](https://github.com/diaspora/diaspora/pull/4407)
* Fix mobile view of deleted reshares [#4397](https://github.com/diaspora/diaspora/issues/4397)
## Features ## Features
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252) * Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
......
...@@ -8,7 +8,7 @@ module MobileHelper ...@@ -8,7 +8,7 @@ module MobileHelper
if (post.public? || reshare?(post)) && (user_signed_in? && post.author != current_user.person) if (post.public? || reshare?(post)) && (user_signed_in? && post.author != current_user.person)
absolute_root = reshare?(post) ? post.absolute_root : post absolute_root = reshare?(post) ? post.absolute_root : post
if absolute_root.author != current_user.person if absolute_root && absolute_root.author != current_user.person
reshare = Reshare.where(:author_id => current_user.person_id, reshare = Reshare.where(:author_id => current_user.person_id,
:root_guid => absolute_root.guid).first :root_guid => absolute_root.guid).first
klass = reshare.present? ? "active" : "inactive" klass = reshare.present? ? "active" : "inactive"
......
...@@ -11,6 +11,7 @@ Feature: resharing from the mobile ...@@ -11,6 +11,7 @@ Feature: resharing from the mobile
| Alice Smith | alice@alice.alice | | Alice Smith | alice@alice.alice |
| Eve Doe | eve@eve.eve | | Eve Doe | eve@eve.eve |
And a user with email "bob@bob.bob" is connected with "alice@alice.alice" And a user with email "bob@bob.bob" is connected with "alice@alice.alice"
And a user with email "eve@eve.eve" is connected with "bob@bob.bob"
Given "bob@bob.bob" has a public post with text "reshare this!" Given "bob@bob.bob" has a public post with text "reshare this!"
And I sign in as "alice@alice.alice" And I sign in as "alice@alice.alice"
...@@ -41,3 +42,7 @@ Feature: resharing from the mobile ...@@ -41,3 +42,7 @@ Feature: resharing from the mobile
And I sign in as "bob@bob.bob" And I sign in as "bob@bob.bob"
And I toggle the mobile view And I toggle the mobile view
Then I should see "Original post deleted by author." within ".reshare" Then I should see "Original post deleted by author." within ".reshare"
And I log out
And I sign in as "eve@eve.eve"
And I toggle the mobile view
Then I should see "Original post deleted by author." within ".reshare"
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter