mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-18 03:17:04 +02:00
fix: resolve lint errors from logging cleanup
- Fix empty block statement by simplifying next handler - Prefix unused parameters with underscore (_response, _err) - All lint checks now pass with 0 errors
This commit is contained in:
@@ -228,11 +228,8 @@ export class Nip10Adapter extends ChatProtocolAdapter {
|
||||
const subscription = pool
|
||||
.subscription(relays, filters, { eventStore })
|
||||
.subscribe({
|
||||
next: (response) => {
|
||||
if (typeof response === "string") {
|
||||
} else {
|
||||
// Event received and added to EventStore
|
||||
}
|
||||
next: (_response) => {
|
||||
// EOSE or event - both handled by EventStore
|
||||
},
|
||||
});
|
||||
|
||||
@@ -272,7 +269,6 @@ export class Nip10Adapter extends ChatProtocolAdapter {
|
||||
|
||||
messages.push(...replyMessages);
|
||||
|
||||
|
||||
// Sort by timestamp ascending (chronological order)
|
||||
return messages.sort((a, b) => a.timestamp - b.timestamp);
|
||||
}),
|
||||
@@ -293,7 +289,6 @@ export class Nip10Adapter extends ChatProtocolAdapter {
|
||||
throw new Error("Root event ID required");
|
||||
}
|
||||
|
||||
|
||||
// Same filters as loadMessages but with until for pagination
|
||||
const filters: Filter[] = [
|
||||
{
|
||||
@@ -452,7 +447,6 @@ export class Nip10Adapter extends ChatProtocolAdapter {
|
||||
const draft = await factory.build({ kind: 1, content, tags });
|
||||
const event = await factory.sign(draft);
|
||||
|
||||
|
||||
// Publish to conversation relays
|
||||
await publishEventToRelays(event, relays);
|
||||
}
|
||||
@@ -554,7 +548,6 @@ export class Nip10Adapter extends ChatProtocolAdapter {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
const filter: Filter = {
|
||||
ids: [eventId],
|
||||
limit: 1,
|
||||
@@ -703,7 +696,7 @@ export class Nip10Adapter extends ChatProtocolAdapter {
|
||||
if (outbox.length > 0) {
|
||||
relays.add(normalizeURL(outbox[0]));
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (_err) {
|
||||
// Silently continue if participant has no relay list
|
||||
}
|
||||
}
|
||||
@@ -728,7 +721,6 @@ export class Nip10Adapter extends ChatProtocolAdapter {
|
||||
].forEach((r) => relays.add(r));
|
||||
}
|
||||
|
||||
|
||||
// Limit to 10 relays max for performance
|
||||
return Array.from(relays).slice(0, 10);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user