Accidentally used the wrong this when emitting message events.

cc @squamos