A bugfix and a new feature.

nitpick.. can you rename `hasTs` to `exists`? Thanks!

```go
if _, exists := msg["timestamp"]; !exists {
    // ...
}
```