Added libotr4 message handlers
Changed functions for libotr4 compatibility