Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/fnbrjs/fnbr.js into pr/35
Browse files Browse the repository at this point in the history
  • Loading branch information
tnfAngel committed Nov 23, 2024
2 parents 97ac7fb + 946abf3 commit b4a2788
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
13 changes: 13 additions & 0 deletions docs/general/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.1.0

### Changes
* Chatting
* Added `Client#chat` as the client's chat manager
* Deprecated `ClientParty#chatBan()`

### Fixes
* Party Meta
* Fixed a bug that caused party members to be invisible when the client created the party
* Chatting
* Fixed an issue that caused the client to not receive chat messages

## 4.0.0

### Additions
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fnlb-project/fnbr",
"version": "4.0.1",
"version": "4.1.0",
"description": "A library to interact with Epic Games' Fortnite HTTP and XMPP services",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions resources/defaultPartyMeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Default:PlaylistData_j": "{\"PlaylistData\":{\"playlistName\":\"Playlist_DefaultSquad\",\"tournamentId\":\"\",\"eventWindowId\":\"\",\"linkId\":{\"mnemonic\":\"playlist_defaultsquad\",\"version\":-1},\"bGracefullyUpgraded\":false,\"matchmakingRulePreset\":\"RespectParties\"}}",
"Default:PrimaryGameSessionId_s": "",
"Default:PrivacySettings_j": "{\"PrivacySettings\":{\"partyType\":\"Public\",\"partyInviteRestriction\":\"AnyMember\",\"bOnlyLeaderFriendsCanJoin\":false}}",
"Default:RawSquadAssignments_j": "{\"RawSquadAssignments\":[]}",
"Default:SquadInformation_j": "{\"SquadInformation\":{\"rawSquadAssignments\":[],\"squadData\":[{\"jamTempo\":0,\"jamKey\":0,\"jamMode\":0}]}}",
"Default:RegionId_s": "EU",
"Default:SelectedIsland_j": "{\"SelectedIsland\":{\"linkId\":{\"mnemonic\":\"playlist_defaultsquad\",\"version\":-1},\"worldId\":{\"iD\":\"\",\"ownerId\":\"INVALID\",\"name\":\"\"},\"sessionId\":\"\",\"joinInfo\":{\"islandJoinability\":\"CanNotBeJoinedOrWatched\",\"bIsWorldJoinable\":false,\"sessionKey\":\"\"}}}",
"Default:TileStates_j": "{\"TileStates\":[]}",
Expand All @@ -35,4 +35,4 @@
"urn:epic:cfg:party-type-id_s": "default",
"urn:epic:cfg:presence-perm_s": "Anyone",
"VoiceChat:implementation_s": "VivoxVoiceChat"
}
}
4 changes: 2 additions & 2 deletions src/structures/party/ClientParty.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class ClientParty extends Party {
if (!this.me.isLeader) throw new PartyPermissionError();

await this.sendPatch({
'Default:RawSquadAssignments_j': this.meta.refreshSquadAssignments(),
'Default:SquadInformation_j': this.meta.refreshSquadAssignments(),
});
}

Expand All @@ -266,7 +266,7 @@ class ClientParty extends Party {
* @deprecated This feature has been deprecated since epic moved chatting away from xmpp
*/
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
public async chatBan(member: string) {
public async chatBan() {
const deprecatedFn = deprecate(() => { }, deprecationNotOverXmppAnymore);

return deprecatedFn();
Expand Down
10 changes: 8 additions & 2 deletions src/structures/party/ClientPartyMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ class ClientPartyMeta extends PartyMeta {
}
});

return this.set('Default:RawSquadAssignments_j', {
RawSquadAssignments: assignments,
const squadInformation = this.get('Default:SquadInformation_j');

return this.set('Default:SquadInformation_j', {
...squadInformation,
SquadInformation: {
...squadInformation.SquadInformation,
rawSquadAssignments: assignments,
},
});
}

Expand Down

0 comments on commit b4a2788

Please sign in to comment.