if (!CONFIG_LIST_PATTERN.matcher(listVal).matches()) {
throw new PropertyException("invalid list: " + listVal + " (should be of the form user_name/list_id)");
}
String[] parts = listVal.split("/");
User user = new User(parts[0]);
String listId = parts[1];
List<User> l = client.getListMembers(user, listId);
users.addAll(l);
} else if (key.startsWith(TwitLogic.FOLLOWUSER)) {
String screenName = props.getString(key);
if (!CONFIG_USERNAME_PATTERN.matcher(screenName).matches()) {
throw new PropertyException("invalid screen name: " + screenName);
}
// Twitter requires user IDs (as opposed to screen names) for follow filters.
User u = client.findUserInfo(screenName);
users.add(u);
} else if (key.startsWith(TwitLogic.FOLLOWFOLLOWED)) {
String screenName = props.getString(key);
if (!CONFIG_USERNAME_PATTERN.matcher(screenName).matches()) {
throw new PropertyException("invalid screen name: " + screenName);
}
// Twitter requires user IDs (as opposed to screen names) for follow filters.
User u = client.findUserInfo(screenName);
List<User> l = client.getFollowees(u, -1);
users.addAll(l);
}
}