Use character name for gallery URL

5555b3e7dbb36cab9b1e30c51261573d20ff7ce8

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -2Ignore whitespace
public/scripts/extensions/gallery/index.js+2 -2
@@ -171,7 +171,7 @@ async function showCharGallery() {
171 let url = selected_group || this_chid;171 let url = selected_group || this_chid;
172 if (!selected_group && this_chid !== undefined) {172 if (!selected_group && this_chid !== undefined) {
173 const char = characters[this_chid];173 const char = characters[this_chid];
174 url = char.avatar.replace('.png', '');174 url = char.name;
175 }175 }
176176
177 const items = await getGalleryItems(url);177 const items = await getGalleryItems(url);
@@ -457,7 +457,7 @@ async function listGalleryCommand(args) {
457 let url = args.char ?? (args.group ? groups.find(it => it.name == args.group)?.id : null) ?? (selected_group || this_chid);457 let url = args.char ?? (args.group ? groups.find(it => it.name == args.group)?.id : null) ?? (selected_group || this_chid);
458 if (!args.char && !args.group && !selected_group && this_chid !== undefined) {458 if (!args.char && !args.group && !selected_group && this_chid !== undefined) {
459 const char = characters[this_chid];459 const char = characters[this_chid];
460 url = char.avatar.replace('.png', '');460 url = char.name;
461 }461 }
462462
463 const items = await getGalleryItems(url);463 const items = await getGalleryItems(url);