update home.js to add message type