-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Sending async/ad hoc messages for skype is working well with the following message object:
message = {
'type': 'message',
'channelId': user['channelId'],
'conversation': {
'id': user['conversationId']
},
'serviceUrl': user['serviceUrl'],
'from': {
'id': '*******:*********',
'name': 'botname'
}
}
But the above doesn't work for slack. It gives me the following error:
Error posting to Microsoft Bot Connector. Status Code: 400, Text { error: { code: Missing Property, message: The from field is required } }
If I change the mesage to following:
message = {'type': 'message',
# 'id': '*********',
# 'timestamp': '2017-08-16T17:22:07.1718198Z',
'serviceUrl': 'https://slack.botframework.com',
'channelId': 'slack',
'fromAccount': {
'id': '*******:********',
'name': 'botname'
},
'conversation': {
'isGroup': False,
'id': '*****:*******:*********'
},
'from': {
'id': user['userId'],
'name': user['name']
},
'recipient': {
'id': user['userId'],
'name': user['name']
},
'channelData': {
'SlackMessage': {
# 'type': 'user_typing',
'channel': '*********',
'user': '********'
},
# 'ApiToken': 'xxxxxxxxxxx'
}
}
I get the following error:
ERROR:microsoftbotframework.response:Error posting to Microsoft Bot Connector. Status Code: 400, Text {
"error": {
"code": "MissingProperty",
"message": "The bot referenced by the 'from' field is unrecognized"
}
}
Btw sending replies to slack works normally using:
reply = ReplyToActivity(fill=message,
channelData={},
**response).send()
Any suggestions?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels