mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-30 02:40:12 +08:00
Fixed group member retrieval paging not working
This commit is contained in:
parent
88063ebf27
commit
c291f0fab3
@ -9,17 +9,17 @@ SteamCommunity.prototype.getGroupMembers = function(gid, callback, members, link
|
|||||||
if (!link) {
|
if (!link) {
|
||||||
if (typeof gid !== 'string') {
|
if (typeof gid !== 'string') {
|
||||||
// It's a SteamID object
|
// 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 {
|
} else {
|
||||||
try {
|
try {
|
||||||
var sid = new SteamID(gid);
|
var sid = new SteamID(gid);
|
||||||
if (sid.type == SteamID.Type.CLAN && sid.isValid()) {
|
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 {
|
} else {
|
||||||
throw new Error("Doesn't particularly matter what this message is");
|
throw new Error("Doesn't particularly matter what this message is");
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} 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) {
|
if (result.memberList.nextPageLink) {
|
||||||
addressIdx++;
|
addressIdx++;
|
||||||
self.getGroupMembers(gid, callback, members, result.memberList.nextPageLink, addresses, addressIdx);
|
self.getGroupMembers(gid, callback, members, result.memberList.nextPageLink[0], addresses, addressIdx);
|
||||||
} else {
|
} else {
|
||||||
callback(null, members);
|
callback(null, members);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user