Finished up work on advanced formatted private messaging.

This commit is contained in:
rainbow napkin 2025-10-03 08:58:43 -04:00
parent faf72fd7a5
commit 2feea72694
11 changed files with 164 additions and 94 deletions

View file

@ -14,44 +14,30 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.*/
//localImports
const chatMetadata = require("../chatMetadata");
/**
* Class representing a single chat message
*/
class message{
class message extends chatMetadata{
/**
* Instantiates a chat message object
* @param {String} sender - Name of user who sent the message
* @param {String} user - Name of user who sent the message
* @param {Array} recipients - Array of usernames who are supposed to receive the message
* @param {String} msg - Contents of the message, with links replaced with numbered file-seperator markers
* @param {String} type - Message Type Identifier, used for client-side processing.
* @param {Array} links - Array of URLs/Links included in the message.
*/
constructor(sender, recipients, msg, type, links){
constructor(user, recipients, flair, highLevel, msg, type, links){
//Call derived constructor
super(flair, highLevel, msg, type, links);
/**
* Name of user who sent the message
*/
this.sender = sender;
this.user = user;
/**
* Array of usernames who are supposed to receive the message
*/
this.recipients = recipients;
/**
* Contenst of the messages, with links replaced with numbered file-seperator markers
*/
this.msg = msg;
/**
* Message Type Identifier, used for client-side processing.
*/
this.type = type;
/**
* Array of URLs/Links included in the message.
*/
this.links = links;
}
}