Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: npwd update to version 1.8.6 #563

Merged
merged 1 commit into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@
24. [mythic_notify]: fix: removed unused variables @bitpredator
25. [esx_status]: refactor: remove jquery + Remove some shitty lines @bitpredator
26. [esx_status/server]: fix: unused argument @bitpredator
27. [esx_addoninventory]: chore: check for nil society @bitpredator
27. [esx_addoninventory]: chore: check for nil society @bitpredator
28. [npwd]: chore: npwd update to version 1.8.6 @bitpredator
43 changes: 26 additions & 17 deletions server-data/resources/[phone]/npwd/dist/game/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,12 @@
phoneNumberColumn: "phone_number"
},
images: {
url: "https://api.projecterror.dev/image",
type: "pe_image",
url: "https://api.fivemanage.com/api/image",
type: "image",
imageEncoding: "webp",
contentType: "multipart/form-data",
useContentType: false,
useWebhook: false,
authorizationHeader: "PE-Secret",
authorizationHeader: "Authorization",
authorizationPrefix: "",
useAuthorization: true,
returnedDataIndexes: ["url"]
Expand All @@ -252,7 +251,8 @@
"upload.wikipedia.org",
"i.projecterror.dev",
"upcdn.io",
"i.fivemanage.com"
"i.fivemanage.com",
"api.fivemanage.com"
]
},
profanityFilter: {
Expand Down Expand Up @@ -291,8 +291,8 @@
apps: [],
voiceMessage: {
enabled: false,
authorizationHeader: "PE-Secret",
url: "",
authorizationHeader: "Authorization",
url: "https://api.fivemange/api/audio",
returnedDataIndexes: ["url"]
}
};
Expand Down Expand Up @@ -1107,21 +1107,29 @@
});

// client/sounds/client-sound.class.ts
var Sound;
var SoundIdsByName, Sound;
var init_client_sound_class = __esm({
"client/sounds/client-sound.class.ts"() {
SoundIdsByName = {};
Sound = class {
constructor(soundName, soundSetName) {
this._soundName = soundName;
this._soundSetName = soundSetName;
if (SoundIdsByName[this._soundName]) {
ReleaseSoundId(SoundIdsByName[this._soundName]);
delete SoundIdsByName[this._soundName];
}
this._soundId = GetSoundId();
SoundIdsByName[this._soundName] = this._soundId;
}
play() {
PlaySoundFrontend(this._soundId, this._soundName, this._soundSetName, false);
PlaySoundFromEntity(this._soundId, this._soundName, PlayerPedId(), this._soundSetName, true, 0);
}
stop() {
StopSound(this._soundId);
ReleaseSoundId(this._soundId);
if (SoundIdsByName[this._soundName])
delete SoundIdsByName[this._soundName];
}
};
}
Expand Down Expand Up @@ -1212,7 +1220,7 @@
const hangUpSound = new Sound(this.hangUpSoundName, this.hangUpSoundSet);
hangUpSound.play();
}
handleStartCall(transmitter, receiver, isTransmitter, isUnavailable) {
handleStartCall(transmitter, receiver, isTransmitter, isUnavailable, isAnonymous) {
return __async(this, null, function* () {
if (this.isInCall() || !(yield checkHasPhone()) || this.currentPendingCall)
return emitNet(
Expand All @@ -1237,7 +1245,8 @@
receiver,
isTransmitter,
accepted: false,
isUnavailable
isUnavailable,
isAnonymous
});
});
}
Expand Down Expand Up @@ -1316,8 +1325,8 @@
if (serverRes.status !== "ok") {
return cb == null ? void 0 : cb(serverRes);
}
const { transmitter, isTransmitter, receiver, isUnavailable } = serverRes.data;
callService.handleStartCall(transmitter, receiver, isTransmitter, isUnavailable);
const { transmitter, isTransmitter, receiver, isUnavailable, isAnonymous } = serverRes.data;
callService.handleStartCall(transmitter, receiver, isTransmitter, isUnavailable, isAnonymous);
cb == null ? void 0 : cb(serverRes);
} catch (e) {
console.error(e);
Expand All @@ -1326,8 +1335,8 @@
});
RegisterNuiCB("npwd:beginCall" /* INITIALIZE_CALL */, initializeCallHandler);
onNetTyped("npwd:startCall" /* START_CALL */, (data) => __async(void 0, null, function* () {
const { transmitter, isTransmitter, receiver, isUnavailable } = data;
callService.handleStartCall(transmitter, receiver, isTransmitter, isUnavailable);
const { transmitter, isTransmitter, receiver, isUnavailable, isAnonymous } = data;
callService.handleStartCall(transmitter, receiver, isTransmitter, isUnavailable, isAnonymous);
}));
RegisterNuiCB("npwd:acceptCall" /* ACCEPT_CALL */, (data, cb) => {
animationService.startPhoneCall();
Expand Down Expand Up @@ -1547,9 +1556,9 @@
sendPhoneEvent("npwd:isPhoneDisabled" /* IS_PHONE_DISABLED */, bool);
});
exps2("isPhoneDisabled", () => global.isPhoneDisabled);
exps2("startPhoneCall", (number) => {
exps2("startPhoneCall", (number, isAnonymous = false) => {
verifyExportArgType("startPhoneCall", number, ["string"]);
initializeCallHandler({ receiverNumber: number });
initializeCallHandler({ receiverNumber: number, isAnonymous });
});
exps2("fillNewContact", (contactData) => {
verifyExportArgType("fillNewContact", contactData, ["object"]);
Expand Down
Loading