Exemplo n.º 1
0
 public static Set<String> extraStatusMentions(final Status status, boolean excludeSelf) {
   Pattern mentionPattern = FeaturePatternUtils.getMentionPattern(status.getServiceProvider());
   Matcher matcher = mentionPattern.matcher(status.getText());
   Set<String> mentions = new LinkedHashSet<String>();
   while (matcher.find()) {
     mentions.add(matcher.group());
   }
   if (excludeSelf) {
     mentions.remove(status.getUser().getMentionName());
   }
   return mentions;
 }