【问题标题】:In botframework how to modify sent message to teams channel once user replied在 botframework 中,一旦用户回复,如何修改发送到团队频道的消息
【发布时间】:2019-11-01 04:46:51
【问题描述】:

一旦用户响应,我正在尝试修改 Bot 发送给用户的最后一条消息。

为此,我正在尝试使用需要对话 ID 和活动 ID 的其余 API。

我面临的问题是这个api只有在activityId是发送消息的replyToId时才有效。但是在发送消息时甚至在发送中间件期间,replyToId 都不可用。它在 Connector postMessage 函数内部生成,中间件无法存储。

如何获取有效的 activityId 来修改 Bot 从 Bot 发送的消息?有什么建议吗?

【问题讨论】:

    标签: botframework direct-line-botframework


    【解决方案1】:

    在 V3 中

    session.sendBartch( (e, addresses) =>{
      // addresses contain the id that now can be used for modifying
    
    })
    

    在 V4 中

    responses = await context.sendActivities( [ activities array]) 
    // responses contain the id required for modifying.
    

    【讨论】:

      猜你喜欢
      • 2021-04-18
      • 2020-04-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-06
      • 1970-01-01
      • 2023-03-26
      相关资源
      最近更新 更多