Fix message type

When creating a `MessageEvent`, the current type is not given but `"message"` is always used instead.
This pull request fix this.