You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
anywhere
Additional context
suggestion fix for Label.js adding a local color table
'use strict';constBase=require('./Base');// eslint-disable-next-line no-unused-varsconstChat=require('./Chat');constColors=["#ff9485","#64c4ff","#ffd429","#dfaef0","#99b6c1","#55ccb3","#ff9dff","#d3a91d","#6d7cce","#d7e752","#00d0e2","#ffc5c7","#93ceac","#f74848","#00a0f2","#83e422","#ffaf04","#b5ebff","#9ba6ff","#9368cf"]/** * WhatsApp Business Label information */classLabelextendsBase{/** * @param {Base} client * @param {object} labelData */constructor(client,labelData){super(client);if(labelData)this._patch(labelData);}_patch(labelData){/** * Label ID * @type {string} */this.id=labelData.id;/** * Label name * @type {string} */this.name=labelData.name;/** * Label hex color * @type {string} */this.hexColor=Colors[labelData.colorIndex];}/** * Get all chats that have been assigned this Label * @returns {Promise<Array<Chat>>} */asyncgetChats(){returnthis.client.getChatsByLabelId(this.id);}}module.exports=Label;
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Describe the bug
whatsapp is now using colorIndex
Expected behavior
label.hexColor
should not be undefinedSteps to Reproduce the Bug or Issue
Just use client.getLabels to get a Label[] list
Relevant Code
No response
Browser Type
Chromium
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
anywhere
Additional context
suggestion fix for Label.js adding a local color table
The text was updated successfully, but these errors were encountered: