text: const store = require('./store');
  
  function addChat(users){
      if(!users || !Array.isArray(users)){
          return Promise.reject('Invalid User list');
      }
  
      const chat = {
          users: users,
      };
  
      return store.add(chat);
  }
  
  function listChats(usersId){
      return store.list(usersId);
  }
  
  module.exports = {
      addChat,
      listChats
  }