Change Profile Picture + Change Group Settings + Send Message to Oneself

This commit is contained in:
Adhiraj
2020-07-19 23:26:48 +05:30
parent da73905b5e
commit 7f2468efcf
12 changed files with 130 additions and 54 deletions

View File

@@ -326,7 +326,8 @@ export default class WhatsAppWebMessages extends WhatsAppWebGroups {
status: WAMessageProto.proto.WebMessageInfo.WEB_MESSAGE_INFO_STATUS.PENDING
}
const json = ['action', {epoch: this.msgCount.toString(), type: 'relay'}, [['message', null, messageJSON]]]
const response = await this.queryExpecting200(json, [WAMetric.message, WAFlag.ignore], null, messageJSON.key.id)
const flag = id === this.userMetaData.id ? WAFlag.acknowledge : WAFlag.ignore // acknowledge when sending message to oneself
const response = await this.queryExpecting200(json, [WAMetric.message, flag], null, messageJSON.key.id)
return {
status: response.status as number,
messageID: messageJSON.key.id,