-
Notifications
You must be signed in to change notification settings - Fork 24
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
How to interact with group chats? #81
Comments
You can send messages to group chats just as you send messages to simple contacts. You can get events from group chats and respond to them but the API to list the group chats you are participating in is missing at the moment. const onMessage = (resource: resources.TextResource): void => {
const conversationId: string = resource.conversation;
// This is the id of the simple contact or group chat
console.log(conversationId);
// There was a recent update to help to handle resources by id:
// import * as mri from "skype-http/mri"
// if (mri.parse(conversationId).type === mri.MriType.GroupConversation) {
// console.log("This is a group conversation");
// }
api.sendMessage({textContent: "Hello, World!"}, conversationId).catch(console.error);
};
api.on("Text", onMessage);
api.on("RichText", onMessage); |
I haven't looked into it but if you find the API endpoint to list the currently existing group chats, it would be a nice addition. |
The method above lists the available conversations: PMs and group chats. I'll try to add support for this as soon as possible. |
Huh, well. It turns out that the method to get the conversations already exists 😄 : Line 69 in faf4879
Still, I'll update the types to match the contacts API. |
Updating the conversation types also requires me to update the message types. It will improve the health of the lib a lot but requires more time. |
Is there a way to interact with group chats? (Not the old p2p. The new ones. Like that random one I created 2 days ago.)
The text was updated successfully, but these errors were encountered: