mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Emit group chat changed event
This commit is contained in:
@ -49,6 +49,8 @@ EventEmitter.prototype.removeListener = function (event, listener) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
EventEmitter.prototype.emit = async function (event) {
|
EventEmitter.prototype.emit = async function (event) {
|
||||||
|
console.debug('Event emitted: ' + event);
|
||||||
|
|
||||||
var i, listeners, length, args = [].slice.call(arguments, 1);
|
var i, listeners, length, args = [].slice.call(arguments, 1);
|
||||||
|
|
||||||
if (typeof this.events[event] === 'object') {
|
if (typeof this.events[event] === 'object') {
|
||||||
|
@ -53,6 +53,9 @@ import {
|
|||||||
saveChatConditional,
|
saveChatConditional,
|
||||||
deactivateSendButtons,
|
deactivateSendButtons,
|
||||||
activateSendButtons,
|
activateSendButtons,
|
||||||
|
eventSource,
|
||||||
|
event_types,
|
||||||
|
getCurrentChatId,
|
||||||
} from "../script.js";
|
} from "../script.js";
|
||||||
import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect } from './tags.js';
|
import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect } from './tags.js';
|
||||||
|
|
||||||
@ -172,6 +175,7 @@ export async function getGroupChat(groupId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await saveGroupChat(groupId, true);
|
await saveGroupChat(groupId, true);
|
||||||
|
eventSource.emit(event_types.CHAT_CHANGED, getCurrentChatId());
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFirstCharacterMessage(character) {
|
function getFirstCharacterMessage(character) {
|
||||||
|
Reference in New Issue
Block a user