Changed to chatmessages and implemented fine-grained handling
Fixed a bit for CORS