Skip to content

Commit

Permalink
Merge pull request #133 from SOBotics/hotfix/130-time-between-reposts
Browse files Browse the repository at this point in the history
- fixed #130
  • Loading branch information
FelixSFD authored Jan 13, 2018
2 parents e9577bd + 25accf7 commit 7801e39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>de.felixsfd.stackoverflow</groupId>
<artifactId>guttenberg</artifactId>
<version>0.10.0</version>
<version>0.10.1</version>

<dependencies>
<dependency>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/sobotics/guttenberg/entities/PostMatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ public boolean isValidMatch() {
long minutes = ChronoUnit.MINUTES.between(originalCreation, targetCreation);
boolean minimumTimeSpanChecked = minutes >= 5;

//#130: Time-span for reposts: 0 minutes
if (this.target.getAnswerID() == this.original.getAnswerID())
minimumTimeSpanChecked = minutes >= 0;

return lengthOne >= minimumLength && lengthTwo >= minimumLength && minimumTimeSpanChecked;
}

Expand Down

0 comments on commit 7801e39

Please sign in to comment.