ocilo / skype-http

Unofficial Skype API for Node.js via HTTP
https://ocilo.github.io/skype-http
MIT License
51 stars 24 forks source link

Add prefix to id of getContacts and possibly others #14

Open demurgos opened 8 years ago

demurgos commented 8 years ago

The contacts returned by .getContacts should be prefixed by their type (as 8: for human users).

mitchcapper commented 7 years ago

Not sure if we want to extend this to other methods that return id's without being prefixed. Do we just assume a non-prefixed id is type 8?

demurgos commented 7 years ago

I think that we need more data about this. Its better to not prefix rather than incorrectly prefix by 8:. I don't know if it is possible or safe to guess the type.

By the way, it seems that a "prefixed" ID is called a "MRI" by Skype (M... Resource Identifier ? M could be related to "Model"). Maybe it would be good to clearly state when the argument or result uses (non-prefixed) IDs or (prefixed) MRIs because it is currently confusing.

demurgos commented 6 years ago

@mitchcapper It's better to add the prefix everywhere. With the new contacts API (v2), Skype uses it as the only ID for the contacts. We now only have {mri: "8:bob", ...} instead of the old {id: "bob", type: "skype", ...}.