ScuttleBot

ui: filter agents from chat identity dropdown — operators only

lmata 2026-04-04 04:25 trunk
Commit 954037bea92bcc20bb4804684f2cc4dcbd62d729cf7d41abc20e815b0964f67d
1 file changed +2 -4
--- internal/api/ui/index.html
+++ internal/api/ui/index.html
@@ -1919,16 +1919,14 @@
19191919
return localStorage.getItem('sb_chat_nick') || '';
19201920
}
19211921
function populateChatIdentity() {
19221922
const sel = document.getElementById('chat-identity');
19231923
const current = getChatNick();
1924
- // Operators + any registered nick can send (all types visible, operators first)
1924
+ // Only operators (human users) can chat — agents are not selectable.
19251925
const operators = allAgents.filter(a => a.type === 'operator' && !a.revoked);
1926
- const bots = allAgents.filter(a => a.type !== 'operator' && !a.revoked);
1927
- const options = [...operators, ...bots];
19281926
sel.innerHTML = '<option value="">— pick a user —</option>' +
1929
- options.map(a => `<option value="${esc(a.nick)}"${a.nick===current?' selected':''}>${esc(a.nick)} (${esc(a.type)})</option>`).join('');
1927
+ operators.map(a => `<option value="${esc(a.nick)}"${a.nick===current?' selected':''}>${esc(a.nick)}</option>`).join('');
19301928
// Restore saved selection.
19311929
if (current) sel.value = current;
19321930
}
19331931
19341932
function toggleChatLayout() {
19351933
--- internal/api/ui/index.html
+++ internal/api/ui/index.html
@@ -1919,16 +1919,14 @@
1919 return localStorage.getItem('sb_chat_nick') || '';
1920 }
1921 function populateChatIdentity() {
1922 const sel = document.getElementById('chat-identity');
1923 const current = getChatNick();
1924 // Operators + any registered nick can send (all types visible, operators first)
1925 const operators = allAgents.filter(a => a.type === 'operator' && !a.revoked);
1926 const bots = allAgents.filter(a => a.type !== 'operator' && !a.revoked);
1927 const options = [...operators, ...bots];
1928 sel.innerHTML = '<option value="">— pick a user —</option>' +
1929 options.map(a => `<option value="${esc(a.nick)}"${a.nick===current?' selected':''}>${esc(a.nick)} (${esc(a.type)})</option>`).join('');
1930 // Restore saved selection.
1931 if (current) sel.value = current;
1932 }
1933
1934 function toggleChatLayout() {
1935
--- internal/api/ui/index.html
+++ internal/api/ui/index.html
@@ -1919,16 +1919,14 @@
1919 return localStorage.getItem('sb_chat_nick') || '';
1920 }
1921 function populateChatIdentity() {
1922 const sel = document.getElementById('chat-identity');
1923 const current = getChatNick();
1924 // Only operators (human users) can chat — agents are not selectable.
1925 const operators = allAgents.filter(a => a.type === 'operator' && !a.revoked);
 
 
1926 sel.innerHTML = '<option value="">— pick a user —</option>' +
1927 operators.map(a => `<option value="${esc(a.nick)}"${a.nick===current?' selected':''}>${esc(a.nick)}</option>`).join('');
1928 // Restore saved selection.
1929 if (current) sel.value = current;
1930 }
1931
1932 function toggleChatLayout() {
1933

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button