aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/messages.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-07 08:34:13 -0700
committerAdam Soltys <[email protected]>2026-10-07 08:34:13 -0700
commita6bae186071e7e07136a37f63864d0bf578edd16 (patch)
tree6fa8a1086f5b30093f7c9085b6afe06d8c69aa60 /src/features/messages.js
parent7067ed8024cf8d4694fe260df90897c5ebecb245 (diff)
parentdfb017c1b10cb52c24f4f0bcf745c6abea11b98f (diff)
downloadcoinosv3-a6bae186071e7e07136a37f63864d0bf578edd16.tar.gz
coinosv3-a6bae186071e7e07136a37f63864d0bf578edd16.zip
Merge branch 'worktree-agent-a4c5f0908bc7757bf'
Diffstat (limited to 'src/features/messages.js')
-rw-r--r--src/features/messages.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 00404a2..899ee1d 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -209,7 +209,7 @@ export function messagesFeature(ctx) {
saveEmoji();
}
const emojiRelays = (extra = []) => [...new Set([...extra, ...zapRelays(), ...DM_RELAYS, ...STOCK_RELAYS])];
- async function fetchPack(ref) {
+ async function fetchEmojiPack(ref) { // (not fetchPack: that name is the follow packs' further down, and a second declaration wins)
const evs = await queryOn(emojiRelays(ref.relays), { kinds: [EMOJI_SET_KIND], authors: [ref.pubkey], '#d': [ref.identifier] }, 6000).catch(() => []);
const newest = (evs || []).sort((a, b) => b.created_at - a.created_at)[0];
return newest ? parseEmojiSet(newest) : null;
@@ -230,7 +230,7 @@ export function messagesFeature(ctx) {
const addr = packAddr(ref.pubkey, ref.identifier);
if (hasPack(addr)) { toast(t('msgEmojiPackHave')); return true; }
ui.emojiBusy = true; render();
- const pack = await fetchPack(ref);
+ const pack = await fetchEmojiPack(ref);
ui.emojiBusy = false;
if (!pack) { toast(t('msgEmojiPackBad')); render(); return false; }
holdPack(pack);
@@ -287,7 +287,7 @@ export function messagesFeature(ctx) {
let changed = false;
for (const addr of want) {
if (s.packs[addr]) continue;
- const pack = await fetchPack(parsePackAddr(addr));
+ const pack = await fetchEmojiPack(parsePackAddr(addr));
if (pack) { holdPack(pack); changed = true; } else s.unfetched.push(addr);
}
// the list's own order wins over arrival order
@@ -7730,7 +7730,6 @@ export function messagesFeature(ctx) {
async function reactTo(ev, emoji) {
const id = await requireIdentity();
- const relays = await noteRelaysFor(ev);
const partial = {
kind: 7, content: emoji || '❤️', created_at: Math.floor(Date.now() / 1000),
tags: [['e', ev.id], ['p', ev.pubkey], ...reactEmojiTags(emoji), CLIENT_TAG],
@@ -7739,7 +7738,8 @@ export function messagesFeature(ctx) {
myReactEv.set(ev.id, evt.id);
noteEvent(evt); // on screen before the relays answer
render();
- publishOn(relays, evt).catch(() => {});
+ // (the author's relay list can take seconds to find: it isn't needed to paint)
+ publishOn(await noteRelaysFor(ev), evt).catch(() => {});
}
// A boost is kind 6 carrying the note it repeats (NIP-18).