#help

Modifying Chatwoot Instance Code and Compiling in Linux VM

TLDR lopes.emanuel.link modifies Chatwoot instance code and asks if compilation is necessary. v_shnu explains for a linux vm installation, a restart is needed without need to rebuild the image.

Powered by Struct AI
Mar 29, 2023 (8 months ago)
lopes.emanuel.link
Photo of md5-13967544c5a04c73b744453a82f5276c
lopes.emanuel.link
02:40 PM
Hello people, I have a instance of chatwoot in production and I need to change the following code:
ruby
  def sync_templates
    response = HTTParty.get("#{business_account_path}/message_templates?access_token=#{whatsapp_channel.provider_config['api_key']}")
    whatsapp_channel.update(message_templates: response['data'], message_templates_last_updated: Time.now.utc) if response.success?
  end

To:
ruby
  def sync_templates
    response = HTTParty.get("#{business_account_path}/message_templates?access_token=#{whatsapp_channel.provider_config['api_key']}&limit=200")
    whatsapp_channel.update(message_templates: response['data'], message_templates_last_updated: Time.now.utc) if response.success?
  end

After I make this change do I need to compile? Can I compile via cwctl console?
Mar 30, 2023 (8 months ago)
v_shnu
Photo of md5-310ea2ceb91b0b302b8f700488e094ad
v_shnu
05:51 AM
What type of installation are you using?
05:51
v_shnu
05:51 AM
For docker based installations, you will have to rebuild the image.
05:52
v_shnu
05:52 AM
For a linux vm installation, you will just need to restart since this is a ruby change.

cwctl --restart
lopes.emanuel.link
Photo of md5-13967544c5a04c73b744453a82f5276c
lopes.emanuel.link
08:17 PM
Thanks for the information I'm using linux vm, can I force load the whatsapp message templates? Or I need to wait for them to load again?