Added basic ignore/unignore functionality

This commit is contained in:
rainbow napkin 2026-11-08 21:01:01 -05:00
parent 999fae91b7
commit b80f82b9f2
6 changed files with 139 additions and 1 deletions

View file

@ -129,7 +129,9 @@ class channel{
this.socket.on("archive", (data) =>{
this.sortQueue(data.archive);
})
});
this.socket.on("ignore", this.handleIgnoredList.bind(this));
}
/**
@ -169,6 +171,21 @@ class channel{
this.streamType = data.streamType;
}
/**
* Updated ignore list
* @param {Array} data - Ignore list received from server
*/
handleIgnoredList(data){
//Update ignored users list
this.user.ignored = data;
//If we have the chatbox loaded in
if(this.chatBox != null){
//Re-render buffer
this.chatBox.rerenderBuffer();
}
}
/**
* Sorts queue, optionally adding new items along the way
* @param {object} queueData - Contains list of entries to add to the queue