You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
No preview for a link in Skype. When I sent a similar link through the Skype app there is a preview, but not with skpy.
I've found that I can fetch link manually by call getUrlMeta but I have no idea where to past that response.
UPD:
Preview does work with old version of Skype for Web, but not in new one and other versions.
Account type
Live account
Steps to reproduce
from skpy import Skype
cli = Skype('username', 'password')
chat = cli.chats.chat('chat_id')
# Clickable link but no preview
chat.sendMsg('<a href="https://github.com">Some link</a>', rich=True)
# Similar as above
chat.sendMsg('<a href="https://github.com">https://stackoverflow.com</a>', rich=True)
Weird, one would expect that to be done purely by the client-side receiver (getUrlMeta calls the endpoint Skype for Web uses as a receiving client).
Guess that means the sending client is now expected to include some extra markup on links? What does a link in the raw message look like when sent from the new Skype for Web?
'\nОсознания людей после фильма СОЗНАНИЕ И ЛИЧНОСТЬ\n#allatra_tv\n\n<a href="https://allatra.tv/video/sovmestnyj-life-pochemu-soznanie-ne-daet-zapisyvat-vlogi">Совместный лайф. Почему сознание не дает записыват
ь влоги?</a>'
No obvious additional markup then. 😐 If you try sending a message from SkPy and from new Skype for Web, there may be some clues if you compare the raw attributes. That holds the whole server response, so there will be a lot of noise, but maybe it has to declare a link for expanding in there somewhere.
For SkPy, you need to retrieve the message from the server rather than looking at the one you just sent. Easiest way is to send the same link via SkPy and S4W, then retrieve both using SkypeChat.getMsgs().
You've written that class should be SkypeMsg but I've got SkypeTextMsg.
SkypeMsg provides the content attribute; SkypeTextMsg is just a subclass for text-based messages.
Interesting that links that sent from old S4W have no preview in a new one. The content text of SkypeMsg is similar. Where I should looking for text of the message? Should it be in payload? I'm see there only something like this for old skype:
Given the sending model is completely different in new S4W (sent via an open websocket in a different format), I'm not sure if this is actually fixable using the old endpoint. The fact that links sent from old S4W don't expand either at least confirms it's not a library issue, but one with the API we're using.
Activity
Terrance commentedon Feb 27, 2019
Weird, one would expect that to be done purely by the client-side receiver (
getUrlMetacalls the endpoint Skype for Web uses as a receiving client).Guess that means the sending client is now expected to include some extra markup on links? What does a link in the raw message look like when sent from the new Skype for Web?
eirenik0 commentedon Feb 28, 2019
Here is are the HTML of the row:

Terrance commentedon Feb 28, 2019
I mean the actual message content, not Skype for Web's rendering of it.
Send a message from new Skype for Web, receive it in SkPy, and check
SkypeMsg.content.eirenik0 commentedon Mar 1, 2019
Here is a msg content of several msgs:
You've written that class should be
SkypeMsgbut I've gotSkypeTextMsg. Not sure if this addition is relevant :)If Cyrillic is bothering you, I could make a post in English :)
Terrance commentedon Mar 1, 2019
No obvious additional markup then. 😐 If you try sending a message from SkPy and from new Skype for Web, there may be some clues if you compare the
rawattributes. That holds the whole server response, so there will be a lot of noise, but maybe it has to declare a link for expanding in there somewhere.For SkPy, you need to retrieve the message from the server rather than looking at the one you just sent. Easiest way is to send the same link via SkPy and S4W, then retrieve both using
SkypeChat.getMsgs().SkypeMsgprovides thecontentattribute;SkypeTextMsgis just a subclass for text-based messages.eirenik0 commentedon Mar 2, 2019
Interesting that links that sent from old S4W have no preview in a new one. The content text of
SkypeMsgis similar. Where I should looking for text of the message? Should it be in payload? I'm see there only something like this for old skype:Terrance commentedon Mar 3, 2019
I'm not sure what that blob is, where did you get it?
I just tried sending from old and new S4Ws, the payload as seen from old S4W (and therefore from SkPy) appears to be the same:
Given the sending model is completely different in new S4W (sent via an open websocket in a different format), I'm not sure if this is actually fixable using the old endpoint. The fact that links sent from old S4W don't expand either at least confirms it's not a library issue, but one with the API we're using.
eirenik0 commentedon Mar 3, 2019
How big this task is? Maybe I could implement it
Terrance commentedon Mar 3, 2019
See notes in #105.