Comments (5)
You can send messages to group chats just as you send messages to simple contacts.
Instead of using the contact id, use the group chat id (a string starting with 19:
).
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);
from skype-http.
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.
from skype-http.
https://client-s.gateway.messenger.live.com/v1/users/ME/conversations?startTime=1514877701928&pageSize=100&view=msnp24Equivalent&targetType=Passport|Skype|Lync|Thread|PSTN
The method above lists the available conversations: PMs and group chats. I'll try to add support for this as soon as possible.
You can then use sendMessage
with the id of the conversation to send messages to group chats.
from skype-http.
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.
from skype-http.
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.
I started work on my repo. I'll probably finish it next week.
from skype-http.
Related Issues (20)
- Unable to login with MicrosoftAccount HOT 3
- Image sending bug HOT 3
- lots of ECONNRESET issues HOT 5
- Sending formatted text HOT 1
- Skype for business
- Not compatible with typescript 3
- Add to contact
- An in-range update of @types/request is breaking the build 🚨 HOT 1
- can't get display name of bots
- Unable to login with MicrosoftAccount HOT 3
- acceptContactRequest URI changed?
- skpy.core.SkypeAuthException: Token file has expired
- skpy.core.SkypeAuthException: Token file has expired HOT 1
- Unable to login with MicrosoftAccount HOT 2
- #t -> #ipt; own profile can not be obtained. HOT 1
- Two-factor authentication
- How to log users who join and leave Group chat calls?
- MicrosoftAccountLogin: Unable to login with MicrosoftAccount. caused by GetLiveToken
- getContacts returns only a dozen contacts HOT 1
- How to create a Skype-only live account? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skype-http.