mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-01 04:17:21 +01:00
reply bug fix
Signed-off-by: nuclearfog <hatespirit666@gmail.com>
This commit is contained in:
parent
2b15f4a722
commit
dd10eb0c7a
@ -401,16 +401,23 @@ public class Tweet implements Serializable {
|
||||
if (start > 0 && end > start)
|
||||
source = source.substring(start, end);
|
||||
}
|
||||
// add reply mention
|
||||
StringBuilder userMentions = new StringBuilder();
|
||||
if (user.getId() != twitterId) {
|
||||
// prevent self mentioning
|
||||
userMentions.append(user.getScreenname());
|
||||
}
|
||||
// add user mentions
|
||||
UserMentionEntity[] mentionedUsers = status.getUserMentionEntities();
|
||||
if (mentionedUsers != null && mentionedUsers.length > 0) {
|
||||
StringBuilder userMentions = new StringBuilder(user.getScreenname());
|
||||
for (UserMentionEntity mention : mentionedUsers) {
|
||||
userMentions.append(" @").append(mention.getScreenName());
|
||||
if (mention.getId() != twitterId) {
|
||||
// filter out current user's screen name
|
||||
userMentions.append(" @").append(mention.getScreenName());
|
||||
}
|
||||
}
|
||||
this.userMentions = userMentions.toString();
|
||||
} else {
|
||||
this.userMentions = user.getScreenname();
|
||||
}
|
||||
this.userMentions = userMentions.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user