@automagik/omni 2.260922.10 → 2.260922.12

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.
package/dist/index.js CHANGED
@@ -137453,7 +137453,7 @@ import { fileURLToPath } from "url";
137453
137453
  // package.json
137454
137454
  var package_default = {
137455
137455
  name: "@automagik/omni",
137456
- version: "2.260922.10",
137456
+ version: "2.260922.12",
137457
137457
  repository: {
137458
137458
  type: "git",
137459
137459
  url: "git+https://github.com/automagik-dev/omni.git",
@@ -136211,6 +136211,18 @@ async function resolveWorkspaceIdentity(botClient) {
136211
136211
  }
136212
136212
  return { teamId, botId, botUserId, botName };
136213
136213
  }
136214
+ async function resolveActingUserName(userClient, actingUserId, username, logger5) {
136215
+ try {
136216
+ const { user } = await userClient.users.info({ user: actingUserId });
136217
+ const candidates = [user?.profile?.display_name, user?.profile?.real_name, user?.real_name];
136218
+ return candidates.find((name) => typeof name === "string" && name.trim().length > 0)?.trim() ?? username;
136219
+ } catch (error) {
136220
+ logger5?.debug("users.info failed for the acting user; presenting the auth.test username", {
136221
+ error: String(error)
136222
+ });
136223
+ return username;
136224
+ }
136225
+ }
136214
136226
  async function waitForSocketOpen(connection) {
136215
136227
  const socketClient = connection.socketClient;
136216
136228
  if (!socketClient) {
@@ -149987,7 +149999,8 @@ var init_plugin = __esm(() => {
149987
149999
  try {
149988
150000
  const auth = await userClient.auth.test();
149989
150001
  const actingUserId = auth.user_id ?? undefined;
149990
- const actingUserName = auth.user ?? undefined;
150002
+ const username = auth.user ?? undefined;
150003
+ const actingUserName = actingUserId ? await resolveActingUserName(userClient, actingUserId, username, this.logger) : username;
149991
150004
  this.logger.info("Acting user identity resolved", { actingUserId, actingUser: actingUserName });
149992
150005
  return { actingUserId, actingUserName };
149993
150006
  } catch (error) {
@@ -266399,7 +266412,7 @@ var init_sentry_scrub = __esm(() => {
266399
266412
  var require_package7 = __commonJS((exports, module) => {
266400
266413
  module.exports = {
266401
266414
  name: "@omni/api",
266402
- version: "2.260922.10",
266415
+ version: "2.260922.12",
266403
266416
  private: true,
266404
266417
  type: "module",
266405
266418
  exports: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/omni",
3
- "version": "2.260922.10",
3
+ "version": "2.260922.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/automagik-dev/omni.git",