IME Composition: Enter Key Triggers Message Send Instead of Confirming Input

An user in my community has posted an Userscript that solved this, might be helpful: https://linux.do/t/topic/670477/17