Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Completed 2 way communication for slack #42

wants to merge 1 commit into from

Conversation

NarayanaSabari
Copy link

Xmessage for 2 way communication on Slack is created, here is the raised Issue : samagra-comms/adapter#60

@NarayanaSabari
Copy link
Author

@CodiumAI-Agent /review

@CodiumAI-Agent

This comment was marked as spam.

@CodiumAI-Agent

This comment was marked as spam.

@@ -0,0 +1,3 @@
export type SlackBotProviderConfig = {
botToken: string
};
Copy link
Contributor

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',
});
});
});
Copy link
Contributor

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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add newline

Comment on lines 21 to 23
webhookUrl: 'webhookUrl',
content: 'chat message',
});
Copy link
Contributor

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> {
Copy link
Contributor

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?

@chinmoy12c
Copy link
Contributor

Hey @NarayanaSabari you would also need to add this adapter to the factory. Refer to the documentation here for details.

@NarayanaSabari
Copy link
Author

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.

@NarayanaSabari
Copy link
Author

This is the updated PR : #44

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