-
-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultiSession Socket.io send notif to all session #1335
Comments
I also noticed this when I started using it. |
I checked the code, this is not the solution, the problem is , when we have multiple Whatsapp number on one server, then the server send the recieved message for all the WP numbers to all the online clients and sessions, so it is a security issue. // Modify the callSocket function to accept a socketId parameter // Create a mapping to store WhatsApp numbers and their corresponding socket IDs // When a user logs in, store their socket ID in the mapping // In your message handling code // Similarly, for other events, find the user's socket and emit the event to it in case I am not NodeJS developers, so please help us to solve this isse. |
Hi, please read and test the PR #1337 |
situation being in PR #1337 |
Description
When you have a different WhatsApp Nomber, and new message commes to session for Line1, the user on session of Line2 also get the notification.
Environment
export default {
secretKey: 'ljkljlkjlkjlkjlkjlkjlkj',
host: 'http://localhost',
port: '21465',
deviceName: 'AID Customer',
poweredBy: 'AIDCustomer-Server',
startAllSession: true,
tokenStoreType: 'file',
maxListeners: 300,
customUserDataDir: './userDataDir/',
webhook: {
url: null,
autoDownload: true,
uploadS3: false,
awsBucketName: null,
readMessage: true,
allUnreadOnStart: false,
listenAcks: true,
onPresenceChanged: true,
onParticipantsChanged: true,
onReactionMessage: true,
onPollResponse: true,
onRevokedMessage: true,
onLabelUpdated: true,
},
chatwoot: {
sendQrCode: true,
sendStatus: true,
},
archive: {
enable: true,
waitTime: 10,
daysToArchive: 45,
},
log: {
level: 'silly', // Before open a issue, change level to silly and retry a action
logger: ['console', 'file'],
},
createOptions: {
browserArgs: [
'--disable-web-security',
'--no-sandbox',
'--disable-web-security',
'--aggressive-cache-discard',
'--disable-cache',
'--disable-application-cache',
'--disable-offline-load-stale-cache',
'--disk-cache-size=0',
'--disable-background-networking',
'--disable-default-apps',
'--disable-extensions',
'--disable-sync',
'--disable-translate',
'--hide-scrollbars',
'--metrics-recording-only',
'--mute-audio',
'--no-first-run',
'--safebrowsing-disable-auto-update',
'--ignore-certificate-errors',
'--ignore-ssl-errors',
'--ignore-certificate-errors-spki-list',
],
},
mapper: {
enable: true,
prefix: 'tagone-',
},
db: {
mongodbDatabase: 'tokens',
mongodbCollection: '',
mongodbUser: '',
mongodbPassword: '',
mongodbHost: '',
mongoIsRemote: true,
mongoURLRemote: '',
mongodbPort: 27017,
redisHost: 'localhost',
redisPort: 6379,
redisPassword: '',
redisDb: 0,
redisPrefix: 'docker',
},
};
Steps to Reproduce
I used the wppconnect-server in docker with 5 instance, nginx to loadbalance to them base on persistant ip-hash, and front
The text was updated successfully, but these errors were encountered: