antenna-fyi 1.3.33 → 1.3.34

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/lib/cli.js CHANGED
@@ -67,7 +67,7 @@ export async function handleScan(f) {
67
67
  export async function handleProfile(f) {
68
68
  const id = resolveId(f);
69
69
  if (!id) return console.error("Usage: antenna profile --id <platform>:<user_id> [--name Yi --personal-description '...' --looking-for '...' --conversation-style '...' --hide --visible true]");
70
- if (f.name || f["personal-description"] !== undefined || f.line1 !== undefined || f["looking-for"] !== undefined || f.line2 !== undefined || f["conversation-style"] !== undefined || f.line3 !== undefined || f["more-information"] !== undefined || f.contact !== undefined || f.visible !== undefined || f.hide !== undefined) {
70
+ if (f.name || f["personal-description"] !== undefined || f.line1 !== undefined || f["looking-for"] !== undefined || f.line2 !== undefined || f["conversation-style"] !== undefined || f.line3 !== undefined || f["more-information"] !== undefined || f.contact !== undefined || f.slug !== undefined || f.visible !== undefined || f.hide !== undefined) {
71
71
  const visible = f.hide ? false : (f.visible !== undefined ? f.visible === 'true' || f.visible === true : undefined);
72
72
  const payload = { device_id: id };
73
73
  if (f.name) payload.display_name = f.name;
@@ -79,6 +79,7 @@ export async function handleProfile(f) {
79
79
  else if (f.line3 !== undefined) payload.line3 = f.line3;
80
80
  if (f["more-information"] !== undefined) payload.matching_context = f["more-information"];
81
81
  if (f.contact !== undefined) payload.contact_info = f.contact;
82
+ if (f.slug !== undefined) payload.profile_slug = f.slug;
82
83
  if (visible !== undefined) payload.visible = visible;
83
84
  const data = await setProfile(payload);
84
85
  if (data?.error) {
package/lib/core.js CHANGED
@@ -332,12 +332,11 @@ export async function setProfile({
332
332
  try {
333
333
  const profile = await getProfile({ device_id, supabaseUrl, supabaseKey });
334
334
  profileSlug = profile?.profile_slug || null;
335
- if (!profileSlug && display_name) {
336
- const slug = display_name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").substring(0, 30);
337
- if (slug) {
338
- const { data: slugResult } = await sb.rpc("set_profile_slug", { p_device_id: device_id, p_slug: slug });
339
- if (slugResult?.set) profileSlug = slug;
340
- }
335
+ // Use explicitly passed slug, or auto-generate from display_name
336
+ const targetSlug = profile_slug || (!profileSlug && display_name ? display_name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").substring(0, 30) : null);
337
+ if (targetSlug && targetSlug !== profileSlug) {
338
+ const { data: slugResult } = await sb.rpc("set_profile_slug", { p_device_id: device_id, p_slug: targetSlug });
339
+ if (slugResult?.set) profileSlug = targetSlug;
341
340
  }
342
341
  if (profileSlug) {
343
342
  publicUrl = `https://www.antenna.fyi/p/${profileSlug}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antenna-fyi",
3
- "version": "1.3.33",
3
+ "version": "1.3.34",
4
4
  "description": "Antenna \u2014 nearby people discovery. CLI + MCP server + OpenClaw skill & plugin, all in one package.",
5
5
  "type": "module",
6
6
  "bin": {