Added site-wide emote support.

This commit is contained in:
rainbow napkin 2024-12-20 01:42:48 -05:00
parent 41d0302ded
commit 97717b525c
11 changed files with 122 additions and 22 deletions

View file

@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
//local imports
const flairModel = require('../../schemas/flairSchema');
const emoteModel = require('../../schemas/emoteSchema');
const permissionModel = require('../../schemas/permissionSchema');
module.exports = class{
@ -87,6 +88,14 @@ module.exports = class{
this.emit("clientMetadata", {user: userObj, flairList});
}
async sendSiteEmotes(){
//Get emote list from DB
const emoteList = await emoteModel.getEmotes();
//Send it off to the user
this.emit('siteEmotes', emoteList);
}
updateFlair(flair){
this.flair = flair;