mukulhase / WebWhatsapp-Wrapper

An API for sending and receiving messages over web.whatsapp [Working as of 18th May 2018]
https://webwhatsapi.readthedocs.io/en/latest/
MIT License
2.02k stars 796 forks source link

addParticipants add funcional #1099

Open rasxod opened 2 years ago

rasxod commented 2 years ago

How creat addParticipants i make this

// add top
{ id: "Participants", conditions: (module) => (module.addParticipants) ? module : null },
// bottom
window.WAPI.addParticipants = function (groupId, participantId) {
  const chat = window.Store.GroupMetadata.get(groupId);
  if (!chat.isGroup) return '';
  const participant = participantId;
  return window.Store.Participants.addParticipants(groupId, [participant])
}

for new vers WP not vork

Error: addParticipants: incoming change missing version id at Object.<anonymous> (https://web.whatsapp.com/bootstrap_qr.1b9f21d5d98ec10b9ccd.js:3:44949)

older vers no error. but not work

can anyone know how to implement this?

mikelustosa commented 2 years ago

How creat addParticipants i make this

// add top
{ id: "Participants", conditions: (module) => (module.addParticipants) ? module : null },
// bottom
window.WAPI.addParticipants = function (groupId, participantId) {
  const chat = window.Store.GroupMetadata.get(groupId);
  if (!chat.isGroup) return '';
  const participant = participantId;
  return window.Store.Participants.addParticipants(groupId, [participant])
}

for new vers WP not vork

Error: addParticipants: incoming change missing version id at Object.<anonymous> (https://web.whatsapp.com/bootstrap_qr.1b9f21d5d98ec10b9ccd.js:3:44949)

older vers no error. but not work

can anyone know how to implement this?

Up!