Permalink
Browse files

Fixed duplicated mentions on replies

  • Loading branch information...
1 parent 72f8f0e commit 78018d34cb35bceed0e0b1a3d68f60cab5265861 @satanas committed Jul 28, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 turpial/data/layout/js/main.js
View
8 turpial/data/layout/js/main.js
@@ -931,12 +931,14 @@ function quote_status(account_id, username, text) {
}
function reply_status(account_id, status_id, title, mentions) {
- //console.log(account_id + ',' + status_id + ',' + mentions);
+ //console.log(account_id + ',' + status_id + ',' + mentions)
var msg = "";
for (var i=0; i < mentions.length; i++) {
- msg += "@" + mentions[i] + " ";
+ if (msg.indexOf(mentions[i]) < 0) {
+ msg += "@" + mentions[i] + " "
+ }
}
- show_update_box(msg, status_id, account_id, title);
+ show_update_box(msg, status_id, account_id, title)
}
function reply_direct(account_id, username) {

0 comments on commit 78018d3

Please sign in to comment.