overte-Armored-Dragon/scripts/system/domainChat/compatibility.js
armored-dragon eedabfa305
Listen for messages and display using notifcore.
Avatar joining and leaving.
2025-02-25 01:08:34 -06:00

23 lines
No EOL
641 B
JavaScript

//
// compatibility.js
//
// Created by Armored Dragon, May 17th, 2024.
// Copyright 2024 Overte e.V.
//
// This provides functions for backwards compatibility for messages.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
const compatibility = {
fromArmoredChat: (messagePacket) => {
let newMessagePacket = {
author: messagePacket.displayName || messagePacket.author || null,
channel: messagePacket.channel.toLowerCase(),
message: messagePacket.message,
position: messagePacket.position
}
return newMessagePacket;
}
}