mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
#2245 Fix custom group avatar display
This commit is contained in:
parent
ccfd3606dc
commit
7fbed26c26
@ -637,7 +637,7 @@ function isValidImageUrl(url) {
|
|||||||
if (Object.keys(url).length === 0) {
|
if (Object.keys(url).length === 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return isDataURL(url) || (url && url.startsWith('user'));
|
return isDataURL(url) || (url && (url.startsWith('user') || url.startsWith('/user')));
|
||||||
}
|
}
|
||||||
|
|
||||||
function getGroupAvatar(group) {
|
function getGroupAvatar(group) {
|
||||||
@ -1418,6 +1418,10 @@ function select_group_chats(groupId, skipAnimation) {
|
|||||||
* @returns {Promise<void>} - A promise that resolves when the processing and upload is complete.
|
* @returns {Promise<void>} - A promise that resolves when the processing and upload is complete.
|
||||||
*/
|
*/
|
||||||
async function uploadGroupAvatar(event) {
|
async function uploadGroupAvatar(event) {
|
||||||
|
if (!(event.target instanceof HTMLInputElement) || !event.target.files.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const file = event.target.files[0];
|
const file = event.target.files[0];
|
||||||
|
|
||||||
if (!file) {
|
if (!file) {
|
||||||
|
Loading…
Reference in New Issue
Block a user