Skip to content

Commit 5e074ca

Browse files
committed
v3.66.400
1 parent aa1820a commit 5e074ca

4 files changed

Lines changed: 24 additions & 10 deletions

File tree

functions/api/bot.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3659,7 +3659,7 @@ async function handleShopAction(context, body, botPrivkey, botPubkey) {
36593659
}
36603660

36613661
var BOT_NYM = "Nymbot";
3662-
var NYMCHAT_VERSION = "3.66.399";
3662+
var NYMCHAT_VERSION = "3.66.400";
36633663
var NYMCHAT_IOS_APP = "https://testflight.apple.com/join/k8FS8Mm3";
36643664
var NYMCHAT_ANDROID_APP = "https://play.google.com/store/apps/details?id=com.nym.bar";
36653665
var COMMAND_PREFIX = "?";
@@ -4296,7 +4296,7 @@ var NYMBOT_SYSTEM_PROMPT = [
42964296
"Games & Fun: ?trivia [category] — AI-generated trivia (general, history, science, crypto, nostr), ?joke — AI-generated joke, ?riddle — AI-generated riddle, ?wordplay [mode] — AI word game (wordle, anagram, scramble), ?flip — Coin flip, ?8ball — Magic 8-ball, ?pick <options> — Random pick.",
42974297
"Utility: ?math <expr> — Calculate, ?units <value> <from> to <to> — Convert units, ?time — UTC time, ?btc — Current Bitcoin price.",
42984298
"Channel Activity: ?who — Active nyms in channel, ?summarize — AI summary of channel discussion, ?top — Top channels by activity, ?last [N] — Recent messages, ?seen <nym> — Where was someone last seen.",
4299-
"Info: ?help — List all bot commands, ?about — About Nymchat (version, platform links), ?nostr — Nostr protocol tips, ?changelog [version] — Live Nymchat release notes pulled from GitHub (default shows the latest release; pass a tag like ?changelog v3.66.399 for a specific version).",
4299+
"Info: ?help — List all bot commands, ?about — About Nymchat (version, platform links), ?nostr — Nostr protocol tips, ?changelog [version] — Live Nymchat release notes pulled from GitHub (default shows the latest release; pass a tag like ?changelog v3.66.400 for a specific version).",
43004300
"Users can also type @Nymbot <question> to ask me directly.",
43014301
"Users can quote-reply any message and mention @Nymbot to ask about it, or reply to my responses to continue the conversation with context.",
43024302
"",
@@ -5129,7 +5129,7 @@ function findRelease(releases, query) {
51295129
var t = (releases[i].tag || "").toLowerCase().replace(/^v/, "");
51305130
if (t === normalized) return releases[i];
51315131
}
5132-
// Prefix match (e.g. "3.61" matches "3.66.399")
5132+
// Prefix match (e.g. "3.61" matches "3.66.400")
51335133
for (var j = 0; j < releases.length; j++) {
51345134
var tt = (releases[j].tag || "").toLowerCase().replace(/^v/, "");
51355135
if (tt.indexOf(normalized) === 0) return releases[j];
@@ -5184,7 +5184,7 @@ function needsChangelogContext(question) {
51845184
if (/\b(changelog|release notes?|what'?s new|whats new|patch notes?|update notes?)\b/.test(q)) return true;
51855185
if (/\b(latest|newest|recent|new|previous|last)\b.{0,30}\b(release|version|update)\b/.test(q)) return true;
51865186
if (/\b(release|version|update)\b.{0,30}\b(history|notes?|log|info)\b/.test(q)) return true;
5187-
// Specific version reference like "3.66.399", "v3.61", "version 3.60.300"
5187+
// Specific version reference like "3.66.400", "v3.61", "version 3.60.300"
51885188
if (/\bv?\d+\.\d+(?:\.\d+)?\b/.test(q) && /\b(nym|nymchat|app|version|release|update)\b/.test(q)) return true;
51895189
return false;
51905190
}

js/app.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,15 +1536,28 @@ function scrollToBottom() {
15361536
const scroller = document.getElementById('messagesScroller');
15371537
if (!scroller) return;
15381538

1539-
// User explicitly wants to go to the bottom — clear the scrolled-up flag
15401539
nym.userScrolledUp = false;
15411540

1542-
// Cancel any pending coalesced scroll so we can do it immediately
15431541
if (nym._scrollRAF) {
15441542
cancelAnimationFrame(nym._scrollRAF);
15451543
nym._scrollRAF = null;
15461544
}
15471545

1546+
// Trim any lazy-loaded older history so the DOM bottom is the real latest.
1547+
if (nym.inPMMode) {
1548+
const convKey = nym.currentGroup
1549+
? nym.getGroupConversationKey(nym.currentGroup)
1550+
: (nym.currentPM ? nym.getPMConversationKey(nym.currentPM) : null);
1551+
if (convKey && typeof nym.collapsePMToLatest === 'function') {
1552+
nym.collapsePMToLatest(convKey);
1553+
}
1554+
} else {
1555+
const storageKey = nym.currentGeohash ? `#${nym.currentGeohash}` : nym.currentChannel;
1556+
if (storageKey && typeof nym.collapseChannelToLatest === 'function') {
1557+
nym.collapseChannelToLatest(storageKey);
1558+
}
1559+
}
1560+
15481561
scroller.scrollTop = 0;
15491562
nym._scheduleScrollToBottom(true);
15501563
}
@@ -3526,7 +3539,7 @@ function initWallpaperUI() {
35263539
}
35273540
}
35283541

3529-
const NYMCHAT_VERSION = 'v3.66.399';
3542+
const NYMCHAT_VERSION = 'v3.66.400';
35303543

35313544
function showAbout(prefill) {
35323545
const modal = document.getElementById('aboutModal');

js/modules/relays.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,6 +2443,9 @@ Object.assign(NYM.prototype, {
24432443
}
24442444
const zapFilter = this._buildZapReceiptFilter();
24452445
if (zapFilter) filters.push(zapFilter);
2446+
if (this.pubkey) {
2447+
filters.push({ kinds: [9735], "#p": [this.pubkey], since: since24h, limit: 200 });
2448+
}
24462449

24472450
// Less critical — anything past position 9 is bundled into a single sub upstream
24482451
if (this.pubkey) {

js/modules/zaps.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,9 +1093,7 @@ Object.assign(NYM.prototype, {
10931093
addZapBtn.innerHTML = `
10941094
<svg viewBox="0 0 24 24">
10951095
<path d="M11 2L1 14h8l-1 8 10-12h-8l1-8z" stroke="var(--text)" fill="var(--text)"/>
1096-
<circle cx="19" cy="6" r="5" fill="var(--text)" stroke="none"></circle>
1097-
<line x1="19" y1="4" x2="19" y2="8" stroke="var(--bg)" stroke-width="1.5" stroke-linecap="round"></line>
1098-
<line x1="17" y1="6" x2="21" y2="6" stroke="var(--bg)" stroke-width="1.5" stroke-linecap="round"></line>
1096+
<path fill-rule="evenodd" clip-rule="evenodd" d="M19 1a.75.75 0 0 1 .75.75v2h2a.75.75 0 0 1 0 1.5h-2v2a.75.75 0 0 1-1.5 0v-2h-2a.75.75 0 0 1 0-1.5h2v-2A.75.75 0 0 1 19 1" fill="var(--text)"/>
10991097
</svg>
11001098
`;
11011099
addZapBtn.title = 'Quick zap';

0 commit comments

Comments
 (0)