这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@EFF
Copy link
Contributor

@EFF EFF commented Sep 2, 2021

Release Notes

⚠ Important Change Notice

In this release, the channel web was converted to use the new messaging server. This shouldn't cause any noticeable change in useability, but it does bring a large migration that converts all the messages and conversations stored in the channel-web's web_conversations and web_messages tables to tables managed by the messaging server. It also migrates any references to these conversations and messages that exist in other tables. As such, it should not incur any loss of data, and previously existing conversations will still be accesible to users, as well as previously existing HITL handoffs.

Since this migration is so large and impacts so many tables, it has been designed to work using a transaction, meaning that if anything goes wrong during the migration, all changes will be rollbacked automatically to prevent loss of data. You can also run this migration in dry mode using the --dry command line option. This will run the entire migration without applying the changes and will display the number of conversations and messages that will be migrated.

It's possible that some messages and some conversations get deleted due to new constraints required by the messaging server. For example a message pointing to a deleted or null conversation will be deleted, and a conversation pointing to a null botId will also be removed.

Payloads are now sent to the channel-web in the same format as they are stored in the content element files. This means that some usage of the sdk that relied on channel-web specific format of payloads to create events is now invalid. For example :

await bp.events.sendEvent(
  bp.IO.Event({
    botId: 'myBotId',
    direction: 'outgoing',
    channel: 'web',
    target: 'aUserId',
    type: 'file',
    // This payload format is old and deprecated. It may still work due to backward compatibility in the webchat ui but it should be ported as soon as possible
    payload: {
      type: 'file',
      title: 'My image title',
      url: 'https://www.my-website.com/my-image.png'
    }
  })
)

Should be replaced with :

await bp.events.sendEvent(
  bp.IO.Event({
    botId: 'myBotId',
    direction: 'outgoing',
    channel: 'web',
    target: 'aUserId',
    type: 'image',
    // This is the correct payload format to use. Notice that this is the same format in which your content type is saved.
    payload: {
      type: 'image',
      title: 'My image title',
      image: 'https://www.my-website.com/my-image.png'
    }
  })
)

I you we using the renderElement method already then everything should still work

// This works in both the old and new version
bp.events.replyToEvent(
  event,
  await bp.cms.renderElement(
    'builtin_image',
    { title: 'My image title', image: 'https://www.my-website.com/my-image.png' },
    event
  )
)

This change only affects builtin content types. Custom content types still use the backend renderers defined in renderElement function.

Bug Fixes

  • admin: add the chatuser role id to the filter (#5285) (f582e47)
  • admin: change pipeline stage edit endpoint (#5368) (3c97635)
  • admin: fix restarting Botpress from the admin (#5377) (8d67cca)
  • channel-web: fix missing dependencies (#5375) (ded9b67)
  • core: fix workspace error (#5374) (aca569b)
  • core: remove increment / decrement analytics actions (#5340) (b7d311d)
  • core: remove leftover debug logging (#5369) (5466b1e)
  • core: workspace management api (#5329) (9cfad4e)
  • messaging: prevent multiple bots from using same clientId (#5341) (d6adfc1)
  • misunderstood: change preview column from varchar to text (#5380) (f34fcef)

Features

  • core: add before conversation end hook and flow (#5215) (de732d1)
  • add markdown by default for misunderstood chatPreview (#5372) (60fb52c)
  • display user's object props as string on UserProfile for hitlnext (#5342) (71193d5)
  • hitlnext: add feature to filter handoffs list by tags (#5205) (2725054)

NLU

0.1.4 ==> 0.1.5 see changes here

Studio

0.0.33 ==> 0.0.34 see changes here

Messaging

0.1.8 ==> 0.1.12 see changes here

@EFF EFF requested review from allardy and laurentlp September 2, 2021 02:21
@EFF EFF merged commit 3102f5e into master Sep 2, 2021
@EFF EFF deleted the 12_26_0 branch October 22, 2021 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants