Fixed group member retrieval paging not working

This commit is contained in:
Alexander Corn 2015-08-05 00:52:54 -04:00
parent 88063ebf27
commit c291f0fab3

View File

@ -9,17 +9,17 @@ SteamCommunity.prototype.getGroupMembers = function(gid, callback, members, link
if (!link) {
if (typeof gid !== 'string') {
// It's a SteamID object
link = "https://steamcommunity.com/gid/" + gid.toString() + "/memberslistxml/?xml=1";
link = "http://steamcommunity.com/gid/" + gid.toString() + "/memberslistxml/?xml=1";
} else {
try {
var sid = new SteamID(gid);
if (sid.type == SteamID.Type.CLAN && sid.isValid()) {
link = "https://steamcommunity.com/gid/" + sid.getSteamID64() + "/memberslistxml/?xml=1";
link = "http://steamcommunity.com/gid/" + sid.getSteamID64() + "/memberslistxml/?xml=1";
} else {
throw new Error("Doesn't particularly matter what this message is");
}
} catch (e) {
link = "https://steamcommunity.com/groups/" + gid + "/memberslistxml/?xml=1";
link = "http://steamcommunity.com/groups/" + gid + "/memberslistxml/?xml=1";
}
}
}
@ -55,7 +55,7 @@ SteamCommunity.prototype.getGroupMembers = function(gid, callback, members, link
if (result.memberList.nextPageLink) {
addressIdx++;
self.getGroupMembers(gid, callback, members, result.memberList.nextPageLink, addresses, addressIdx);
self.getGroupMembers(gid, callback, members, result.memberList.nextPageLink[0], addresses, addressIdx);
} else {
callback(null, members);
}