@ai-matrx/messaging 0.7.0 → 0.8.0

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
@@ -734,11 +734,13 @@ function projectParticipants(value, operation) {
734
734
  for (const entry of value) {
735
735
  if (typeof entry !== "object" || entry === null) continue;
736
736
  const record = entry;
737
- const id = str(record, "user_id") ?? str(record, "id");
737
+ const nested = typeof record["user"] === "object" && record["user"] !== null ? record["user"] : {};
738
+ const id = str(record, "user_id") ?? str(nested, "user_id") ?? str(record, "id");
738
739
  if (id === null) continue;
739
740
  summaries.push(
740
741
  projectUserSummary({
741
742
  ...record,
743
+ ...nested,
742
744
  user_id: id
743
745
  })
744
746
  );