Skip to content

Commit

Permalink
pin unpin
Browse files Browse the repository at this point in the history
  • Loading branch information
devlikepro committed Nov 18, 2024
1 parent b052ef4 commit 9423462
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 14 deletions.
26 changes: 14 additions & 12 deletions content/en/docs/how-to/chats/features.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
| | WEBJS | NOWEB |
|-------------------------------------------------------------------------------------|:-----:|:-----:|
| **Get all chats** <br> `GET /api/{session}/chats` | ✔️ | ✔️¹ |
| **Unread chat** <br> `POST /api/{session}/chats/{chatId}/unread` | ✔️ | ✔️¹ |
| **Archive chat** <br> `POST /api/{session}/chats/{chatId}/archive` | ✔️ | ✔️¹ |
| **Unarchive chat** <br> `POST /api/{session}/chats/{chatId}/unarchive` | ✔️ | ✔️¹ |
| **Delete chat** <br> `DELETE /api/{session}/chats/{chatId}` | ✔️ | |
| **Get messages** <br> `GET /api/{session}/chats/{chatId}/messages` | ✔️ | ✔️¹ |
| **Get message by id** <br> `GET /api/{session}/chats/{chatId}/messages/{messageId}` | ✔️ | ✔️¹ |
| **Edit message** <br> `PUT /api/{session}/chats/{chatId}/messages/{messageId}` | ✔️ | ✔️ |
| **Delete message** <br> `DELETE /api/{session}/chats/{chatId}/messages/{messageId}` | ✔️ | ✔️ |
| **Delete all messages** <br> `DELETE /api/{session}/chats/{chatId}/messages` | ✔️ | |
| | WEBJS | NOWEB |
|----------------------------------------------------------------------------------------|:-----:|:-----:|
| **Get all chats** <br> `GET /api/{session}/chats` | ✔️ | ✔️¹ |
| **Unread chat** <br> `POST /api/{session}/chats/{chatId}/unread` | ✔️ | ✔️¹ |
| **Archive chat** <br> `POST /api/{session}/chats/{chatId}/archive` | ✔️ | ✔️¹ |
| **Unarchive chat** <br> `POST /api/{session}/chats/{chatId}/unarchive` | ✔️ | ✔️¹ |
| **Delete chat** <br> `DELETE /api/{session}/chats/{chatId}` | ✔️ | |
| **Get messages** <br> `GET /api/{session}/chats/{chatId}/messages` | ✔️ | ✔️¹ |
| **Get message by id** <br> `GET /api/{session}/chats/{chatId}/messages/{messageId}` | ✔️ | ✔️¹ |
| **Pin message** <br> `POST /api/{session}/chats/{chatId}/messages/{messageId}/pin` | ✔️ | ✔️ |
| **Unpin message** <br> `POST /api/{session}/chats/{chatId}/messages/{messageId}/unpin` | ✔️ | ✔️ |
| **Edit message** <br> `PUT /api/{session}/chats/{chatId}/messages/{messageId}` | ✔️ | ✔️ |
| **Delete message** <br> `DELETE /api/{session}/chats/{chatId}/messages/{messageId}` | ✔️ | ✔️ |
| **Delete all messages** <br> `DELETE /api/{session}/chats/{chatId}/messages` | ✔️ | |

****
1. **NOWEB** - you need to [**Enable Store**]({{< relref "/docs/engines/noweb#store" >}}) to get **chats, contacts and messages**
Expand Down
37 changes: 37 additions & 0 deletions content/en/docs/how-to/chats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,43 @@ GET /api/{session}/chats/{chatId}/messages/{messageId}?downloadMedia=true
- `messageId` - must be in format `{true|false}[email protected]_AAAAAAA`)
- `downloadMedia` - download media files (images, files) or not

### Pin message

```
POST /api/{session}/chats/{chatId}/messages/{messageId}/pin
```

Payload:
```json
{
"duration": 86400
}
```

- 24 hours - `duration=86400`
- 7 days - `duration=604800`
- 30 days - `duration=2592000`

Response:
```json
{
"success": true
}
```

### Unpin message

```
POST /api/{session}/chats/{chatId}/messages/{messageId}/unpin
```

Response:
```json
{
"success": true
}
```

### Edit message
You can edit **text** messages or **"caption"** in media messages.

Expand Down
6 changes: 4 additions & 2 deletions content/en/docs/overview/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ Latest Version:
## 2024.11
`2024.11.5`
- Add [**📊 Dashboard - Event Monitor**]({{< relref "waha-dashboard#event-monitor" >}}) - observe your events in real-time!
- [**🔄 Webhooks**]({{< relref "webhooks#webhooks" >}}) features in **WAHA Core** version now: Retries, HMAC, Custom Headers!
- All [**🔄 Webhooks**]({{< relref "webhooks#webhooks" >}}) features in **WAHA Core** version now: Retries, HMAC, Custom Headers!
- [**🔄 Websockets**]({{< relref "webhooks#websockets" >}}) supports all events now {{< issue 535 >}}
- **NOWEB** - `me.pushName` fix after authentication {{< issue 409 >}}
- [**💬 Chats** - **Pin, Unpin message**]({{< relref "/docs/how-to/chats#pin-message" >}}) {{< issue 613>}}
- **WEBJS**, **NOWEB**
- **NOWEB** - fix `me.pushName` after authentication {{< issue 409 >}}
- Add `engine.event` for debug and troubleshooting

`2024.11.4`
Expand Down

0 comments on commit 9423462

Please sign in to comment.