Remove compatability code that isn't required
This commit is contained in:
parent
47e5eab951
commit
afb909a8a2
2 changed files with 2 additions and 16 deletions
|
|
@ -2,7 +2,7 @@ import { localizer } from "../../utils/localizer.mjs";
|
||||||
import { respondedToQueries } from "../../utils/QueryManager.mjs";
|
import { respondedToQueries } from "../../utils/QueryManager.mjs";
|
||||||
|
|
||||||
export function queryNotify(payload, sender) {
|
export function queryNotify(payload, sender) {
|
||||||
const { id, userID, content, includeGM, includeRequestor } = payload;
|
const { id, userID, content, includeRequestor } = payload;
|
||||||
|
|
||||||
if (userID !== game.user.id) { return };
|
if (userID !== game.user.id) { return };
|
||||||
|
|
||||||
|
|
@ -11,11 +11,6 @@ export function queryNotify(payload, sender) {
|
||||||
|
|
||||||
let whisper = [game.user.id];
|
let whisper = [game.user.id];
|
||||||
|
|
||||||
// TODO: remove this code with #19
|
|
||||||
if (includeGM) {
|
|
||||||
whisper = game.users.filter(u => u.isGM).map(u => u.id);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (includeRequestor) {
|
if (includeRequestor) {
|
||||||
whisper = [sender.id];
|
whisper = [sender.id];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -229,25 +229,16 @@ async function maybeResolve(requestID) {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function notify(requestID, userID, content, { includeGM = false, includeRequestor } = {}) {
|
export async function notify(requestID, userID, content, { includeRequestor } = {}) {
|
||||||
// Prevent sending notifications for not-your queries
|
// Prevent sending notifications for not-your queries
|
||||||
if (!queries.has(requestID)) { return };
|
if (!queries.has(requestID)) { return };
|
||||||
|
|
||||||
// TODO: remove this code with #19
|
|
||||||
if (includeGM) {
|
|
||||||
foundry.utils.logCompatibilityWarning(
|
|
||||||
`The "includeGM" option has been deprecated in favour of "includeRequestor"`,
|
|
||||||
{ since: `v2.4.0`, until: `v3.0.0` },
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
game.socket.emit(`system.taf`, {
|
game.socket.emit(`system.taf`, {
|
||||||
event: `query.notify`,
|
event: `query.notify`,
|
||||||
payload: {
|
payload: {
|
||||||
id: requestID,
|
id: requestID,
|
||||||
userID,
|
userID,
|
||||||
content,
|
content,
|
||||||
includeGM, // TODO: remove this code with #19
|
|
||||||
includeRequestor,
|
includeRequestor,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue