-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completed 2 way communication for slack #42
Conversation
@CodiumAI-Agent /review |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@@ -0,0 +1,3 @@ | |||
export type SlackBotProviderConfig = { | |||
botToken: string | |||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add newline
@@ -21,4 +21,4 @@ test('should trigger Slack correctly', async () => { | |||
webhookUrl: 'webhookUrl', | |||
content: 'chat message', | |||
}); | |||
}); | |||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add newline
userID: msg.user, | ||
bot: false, | ||
}, | ||
channelURI: "Bot", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
channelURI: "Bot", | |
channelURI: "Slack", |
text: string; // The text of the message | ||
ts: string; // The timestamp of the message | ||
channel: string; // The ID of the channel where the message was sent | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: add newline
webhookUrl: 'webhookUrl', | ||
content: 'chat message', | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this test is correct. The sendMessage
method expects channel
to be present, but this test checks for webhookUrl
and chat message
.
return { | ||
id: response.headers['x-slack-req-id'], | ||
date: new Date().toISOString(), | ||
async convertMessageToXMsg(msg: SlackUpdateMessage): Promise<XMessage> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have a test for this function as well?
Hey @NarayanaSabari you would also need to add this adapter to the factory. Refer to the documentation here for details. |
Hey @chinmoy12c, Due to some bug in GitHub, my latest commit is not showing in this PR, so I am closing this pr and raising a new PR. |
This is the updated PR : #44 |
Xmessage for 2 way communication on Slack is created, here is the raised Issue : samagra-comms/adapter#60