@openinc/parse-server-opendash 3.29.3 → 3.29.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,8 +58,6 @@ async function assignUsersAndRoles(ticket, assignedTo, fetchOptions, assigningUs
58
58
  user: ticket.get("user"),
59
59
  batchStamp: batchTime,
60
60
  }));
61
- if (assignedTo.id === assigningUser?.id)
62
- continue;
63
61
  await new types_1.Notification({
64
62
  data: {
65
63
  ticketId: ticket.id,
@@ -93,8 +91,7 @@ async function assignUsersAndRoles(ticket, assignedTo, fetchOptions, assigningUs
93
91
  .query()
94
92
  .find(fetchOptions);
95
93
  for await (const roleUser of roleUsers) {
96
- if (userNotifiedIds.includes(roleUser.id) ||
97
- roleUser.id === assigningUser?.id)
94
+ if (userNotifiedIds.includes(roleUser.id))
98
95
  continue;
99
96
  const resipientlanguage = await (0, getUserLanguage_1.getUserLanguage)(roleUser);
100
97
  const recipientlink = await (0, getTicketLink_1.getTicketLink)(ticket, roleUser);
@@ -10,8 +10,9 @@ const config_1 = require("../../config");
10
10
  async function getTicketLink(ticket, user) {
11
11
  //Get hostname from tenant or environment variable or default to localhost
12
12
  let hostname = "localhost";
13
+ const tenant = (await user.fetchWithInclude("tenant", { useMasterKey: true })).get("tenant");
13
14
  try {
14
- const baseurl = user.get("tenant")?.get("baseUrl");
15
+ const baseurl = tenant?.get("baseUrl");
15
16
  const publicurl = config_1.ConfigInstance.getInstance()
16
17
  .get("PARSE_PUBLIC_SERVER_URL")
17
18
  .replace("/parse", "");
@@ -23,7 +24,7 @@ async function getTicketLink(ticket, user) {
23
24
  }
24
25
  }
25
26
  catch (error) {
26
- console.warn("[@openinc/parse-server-opendash] Could not get PARSE_PUBLIC_SERVER_URL from config, defaulting to localhost");
27
+ console.warn("[@openinc/parse-server-opendash] Could not get a hostname, defaulting to localhost");
27
28
  }
28
29
  return `${hostname}/openservice/ticket/${ticket.id}`;
29
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openinc/parse-server-opendash",
3
- "version": "3.29.3",
3
+ "version": "3.29.5",
4
4
  "description": "Parse Server Cloud Code for open.INC Stack.",
5
5
  "packageManager": "pnpm@10.20.0",
6
6
  "keywords": [