@abdarrahmanabdelnasir/relay-node 0.1.23 → 0.1.24

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.
@@ -141,8 +141,10 @@ export class ConfigCache {
141
141
  const premiumIds = (this.config.premiumUserIds || []).map(String);
142
142
  const isPremiumUser = premiumIds.includes(String(userId));
143
143
  const isPremium = isPremiumRole || isPremiumUser;
144
- // Diagnostic: log list size and match (no raw IDs)
145
- console.log(`[commandless] premium_only check: premiumUserIds.length=${premiumIds.length}, isPremiumUser=${isPremiumUser}, isPremiumRole=${isPremiumRole}, allowed=${isPremium}`);
144
+ // Diagnostic: masked format hint to spot ID type mismatch (e.g. Discord snowflake vs Supabase user_xxx)
145
+ const uidSuffix = String(userId).slice(-4);
146
+ const firstPremiumSuffix = premiumIds[0] ? String(premiumIds[0]).slice(-4) : 'none';
147
+ console.log(`[commandless] premium_only check: premiumUserIds.length=${premiumIds.length}, isPremiumUser=${isPremiumUser}, allowed=${isPremium} (authorId ends ...${uidSuffix}, first premiumId ends ...${firstPremiumSuffix})`);
146
148
  if (!isPremium) {
147
149
  return { allowed: false, reason: 'Premium only' };
148
150
  }
@@ -144,8 +144,10 @@ class ConfigCache {
144
144
  const premiumIds = (this.config.premiumUserIds || []).map(String);
145
145
  const isPremiumUser = premiumIds.includes(String(userId));
146
146
  const isPremium = isPremiumRole || isPremiumUser;
147
- // Diagnostic: log list size and match (no raw IDs)
148
- console.log(`[commandless] premium_only check: premiumUserIds.length=${premiumIds.length}, isPremiumUser=${isPremiumUser}, isPremiumRole=${isPremiumRole}, allowed=${isPremium}`);
147
+ // Diagnostic: masked format hint to spot ID type mismatch (e.g. Discord snowflake vs Supabase user_xxx)
148
+ const uidSuffix = String(userId).slice(-4);
149
+ const firstPremiumSuffix = premiumIds[0] ? String(premiumIds[0]).slice(-4) : 'none';
150
+ console.log(`[commandless] premium_only check: premiumUserIds.length=${premiumIds.length}, isPremiumUser=${isPremiumUser}, allowed=${isPremium} (authorId ends ...${uidSuffix}, first premiumId ends ...${firstPremiumSuffix})`);
149
151
  if (!isPremium) {
150
152
  return { allowed: false, reason: 'Premium only' };
151
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abdarrahmanabdelnasir/relay-node",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",