diff --git a/Changelog.md b/Changelog.md index 63b09c8de..ff4b828e1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -53,6 +53,7 @@ * Fix translation issue in contacts_helper [#3937](https://github.com/diaspora/diaspora/pull/3937) * Show timestamp hovering a timeago string (stream) [#3149](https://github.com/diaspora/diaspora/issues/3149) * Fix reshare and like a post on a single post view [#3672](https://github.com/diaspora/diaspora/issues/3672) +* Fix posting multiple times the same content [#3272](https://github.com/diaspora/diaspora/issues/3272) ## Gem Updates diff --git a/app/assets/javascripts/app/views/publisher_view.js b/app/assets/javascripts/app/views/publisher_view.js index e64da06e9..0da15b333 100644 --- a/app/assets/javascripts/app/views/publisher_view.js +++ b/app/assets/javascripts/app/views/publisher_view.js @@ -108,6 +108,10 @@ app.views.Publisher = Backbone.View.extend(_.extend( // disable submitting this.checkSubmitAvailability(); + // force textchange plugin to update lastValue + this.el_input.data('lastValue', ''); + this.el_hiddenInput.data('lastValue', ''); + return this; }, diff --git a/features/posts_from_main_page.feature b/features/posts_from_main_page.feature index ffa4e44fa..2657e0255 100644 --- a/features/posts_from_main_page.feature +++ b/features/posts_from_main_page.feature @@ -28,6 +28,23 @@ Feature: posting from the main page And I go to the aspects page Then "I am eating yogurt" should be post 1 + Scenario: re-posting a text-only message + Given I expand the publisher + When I fill in the following: + | status_message_fake_text | The World needs more Cats. | + And I press "Share" + And I wait for the ajax to finish + + Given I expand the publisher + When I fill in the following: + | status_message_fake_text | The World needs more Cats. | + And I press "Share" + And I wait for the ajax to finish + + And I go to the aspects page + Then "The World needs more Cats." should be post 1 + Then "The World needs more Cats." should be post 2 + Scenario: posting a message appends it to the top of the stream When I click the publisher and post "sup dog" And I wait for 1 second