antenna-fyi 0.11.1 → 0.11.2
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/core.js +4 -4
- package/package.json +1 -1
package/lib/core.js
CHANGED
|
@@ -86,11 +86,11 @@ export async function scan({ lat, lng, radius_m = 500, device_id, supabaseUrl, s
|
|
|
86
86
|
};
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
// If nobody nearby, fallback to global discover
|
|
89
|
+
// If nobody nearby, fallback to global discover (1 per day)
|
|
90
90
|
if (others.length === 0 && device_id) {
|
|
91
91
|
const { data: globalData } = await sb.rpc("global_discover", {
|
|
92
92
|
p_device_id: device_id,
|
|
93
|
-
p_limit:
|
|
93
|
+
p_limit: 1,
|
|
94
94
|
});
|
|
95
95
|
const globalOthers = globalData || [];
|
|
96
96
|
if (globalOthers.length > 0) {
|
|
@@ -100,7 +100,7 @@ export async function scan({ lat, lng, radius_m = 500, device_id, supabaseUrl, s
|
|
|
100
100
|
profiles: buildProfiles(globalOthers),
|
|
101
101
|
_ref_map: _refMap,
|
|
102
102
|
global: true,
|
|
103
|
-
message: `附近 ${radius_m}m
|
|
103
|
+
message: `附近 ${radius_m}m 暂时没人。今天的全球推荐——这个人跟你可能聊得来。(每天 1 次)`,
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
return {
|
|
@@ -108,7 +108,7 @@ export async function scan({ lat, lng, radius_m = 500, device_id, supabaseUrl, s
|
|
|
108
108
|
radius_m,
|
|
109
109
|
profiles: [],
|
|
110
110
|
_ref_map: {},
|
|
111
|
-
message:
|
|
111
|
+
message: `附近暂时没人,今天的全球推荐已经用完了。明天再来!`,
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
|