Default picture_url for new Visitor


#1

Botpress Version: 10.50

Is it possible to set a Default picture_url for a visitor so there is an avatar for the bot and also for the Visitor.
I already tried this:

  bp.hear({ type: /visit/i }, async ({ user, text }, next) => {
    console.log('first time ' + user.id);
      const knex = await bp.db.get()
      await knex('users').update({
          picture_url: 'https://www.example.com/img/chatbot/user_avatar.png'
      }).where('id', user.id)
      next()
  })

But it takes a restart of the Bot to see the user avatar.


#2

@safcgehrke, you could try running an sql-query setting default value for picture_url.