code: func (chat *Chat) SaveSettings(allSettings interface{}) error {
  
  	serviceID := chat.ctx.getServiceID()
  
  	_, err := chat.ctx.db.C("chats").UpsertId(chat.ID, bson.M{"$set": bson.M{"settings." + serviceID: allSettings}, "$setOnInsert": bson.M{"createdat": time.Now()}})
  
  	if chat.data == nil {
  		chat.data = &chatData{}
  	}
  
  	if chat.data.Settings == nil {
  		chat.data.Settings = make(map[string]interface{})
  	}
  
  	chat.data.Settings[serviceID] = allSettings
  
  	return err
  }
docs: // SaveSettings save Chat's setting for service