Browse Source

feat: update docs

pull/43/head
Aldino Kemal 3 years ago
parent
commit
8530c80f90
  1. 3
      readme.md
  2. 2
      src/pkg/whatsapp/whatsapp.go

3
readme.md

@ -107,7 +107,8 @@ API using [openapi-generator](https://openapi-generator.tech/#try)
| ✅ | Send Video | POST | /send/video |
| ✅ | Send Contact | POST | /send/contact |
| ✅ | Send Link | POST | /send/link |
| ✅ | Revoke Messave | POST | /message/:message_id/revoke |
| ✅ | Send Location | POST | /send/location |
| ✅ | Revoke Message | POST | /message/:message_id/revoke |
```
✅ = Available

2
src/pkg/whatsapp/whatsapp.go

@ -240,7 +240,7 @@ func handler(rawEvt interface{}) {
}
case *events.HistorySync:
id := atomic.AddInt32(&historySyncID, 1)
fileName := fmt.Sprintf("%s/history-%d-%d.json", config.PathStorages, startupTime, id)
fileName := fmt.Sprintf("%s/history-%d-%s-%d-%s.json", config.PathStorages, startupTime, cli.Store.ID.String(), id, evt.Data.SyncType.String())
file, err := os.OpenFile(fileName, os.O_WRONLY|os.O_CREATE, 0600)
if err != nil {
log.Errorf("Failed to open file to write history sync: %v", err)

Loading…
Cancel
Save