Bug fixes

This commit is contained in:
Adhiraj
2020-05-20 11:42:21 +05:30
parent ea5ca61e49
commit 42a3d12236
6 changed files with 46 additions and 19 deletions

View File

@@ -159,15 +159,15 @@
client.loadEntireConversation ("xyz@c.us", (message) => console.log("Loaded message with ID: " + message.key.id))
.then (() => console.log("queried all messages")) // promise resolves once all messages are retreived
```
- To get the status of some person/group
- To get the status of some person
``` javascript
client.getStatus ("xyz@c.us") // leave empty to get your own
.then (json => console.log("status: " + json.status))
.then ((json, q) => console.log("status: " + json.status))
```
- To get the display picture of some person/group
``` javascript
client.getStatus ("xyz@g.us") // leave empty to get your own
.then (json => console.log("download profile picture from: " + json.eurl))
client.getProfilePicture ("xyz@g.us") // leave empty to get your own
.then (([json, q]) => console.log("download profile picture from: " + json.eurl))
```
- To get someone's presence (if they're typing, online)
``` javascript
@@ -178,6 +178,11 @@
Of course, replace ``` xyz ``` with an actual ID. Also, append ``` @c.us ``` for individuals & ``` @g.us ``` for groups.
* __Groups__
- To query the metadata of a group
``` javascript
client.groupMetadata ("abcd-xyz@g.us")
.then (([json, _]) => console.log(json.id + ", title: " + json.subject + ", description: " + json.desc))
```
- To create a group
``` javascript
client.groupCreate ("My Fab Group", ["abcd@s.whatsapp.net", "efgh@s.whatsapp.net"]) // title & participants