如何从 Rasa<->Google 聊天集成后发送到 Rasa 服务器的环聊消息中获取用户电子邮件 ID

How to get User- email Id from hangout messages that are being sent to Rasa server after Rasa<->Google chat integration

我已经集成了 Rasa 和 google 聊天并且能够在 google 聊天中收到回复。我正在尝试获取我从 google 聊天中收到的每个请求的用户电子邮件 ID。我不确定如何从 google 聊天 API 中提到的响应中获取用户对象。如果你能帮助我,那将很有帮助。

非常感谢

环聊频道有一个名为 _extract_sender 的方法,请参阅 https://github.com/RasaHQ/rasa/blob/master/rasa/core/channels/hangouts.py#L209

如果这不能获取您需要的 ID,您可以将类似的方法添加到从请求中提取电子邮件 ID 的通道 JSON