Just register the events with the ID of the channel the query is in.
This should fix the double-enter-and-leave-messages bug AGAIN!!