Skip to content

Commit

Permalink
Merge pull request #828 from /issues/827
Browse files Browse the repository at this point in the history
retweet url validation added at participant side(issues/827 fixed)
  • Loading branch information
Raj6939 authored Jan 25, 2022
2 parents 86941c3 + b374769 commit 00ec8a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/participant/ActionInputs/TwitterRetweet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import webAuth from "../../../mixins/twitterLogin";
import eventBus from "../../../eventBus.js";
import notificationMixins from "../../../mixins/notificationMixins";
import Messages from "../../../utils/messages/participants/en";
import { isretweetUrl } from '../../../mixins/fieldValidationMixin';
export default {
components: { Loading },
name: "TwitterRetweet",
Expand Down Expand Up @@ -166,6 +167,10 @@ export default {
if (!this.retweetUrl) {
throw new Error("Retweet url cannot be empty");
}
if(isretweetUrl(this.retweetUrl)){
this.retweetUrl='';
return false;
}
this.isLoading = true;
const twitterId = localStorage.getItem("twitterId");
if (twitterId) {
Expand Down

0 comments on commit 00ec8a5

Please sign in to comment.