3

I have a Skype bot attached to a working Skype instance in X (Linux). The problem is that the messageStatusChanged event is not always triggered when an incoming message comes. It does in most cases, but sometimes the messages are just "lost". I can see them appearing in the Skype client, but the Skype4Py's event is not triggered for some reason. There's no any difference for these messages in what they contain.

Why can that be happening?

Roman Vinogradov
  • 145
  • 1
  • 12
  • This is known problem for some platforms we have not been unable to pin down. Can you turn on Skype4Py Python debug logging and see if your application receives the messages at all and it's not lost in X11 / dbus routing? – Mikko Ohtamaa Mar 07 '13 at 16:07

1 Answers1

2

No solution but I investigated this a bit further because I am asking myself the same question. You can use dbus-monitor to see if the incoming message had been signaled over dbus when you see messageStatusChanged missing in your application.

$ dbus-monitor "interface=com.Skype.API.Client"

I have the impression that the first status change often goes missing if there was a lot of "silence" from Skype for a longer period of time.

Specifically, a "first" message shows this pattern in the dbus-monitor (yes, in pairs, not sure why that is):

method call sender=:1.1036 -> dest=:1.1028 serial=5088 path=/com/Skype/Client; interface=com.Skype.API.Client; member=Notify
   string "CHAT #thesender/$thereceiver;2c328ad79b074208 ACTIVITY_TIMESTAMP 1362696242"
method call sender=:1.1036 -> dest=:1.1232 serial=5089 path=/com/Skype/Client; interface=com.Skype.API.Client; member=Notify
   string "CHAT #thesender/$thereceiver;2c328ad79b074208 ACTIVITY_TIMESTAMP 1362696242"

The message above doesn't trigger messageStatusChanged but the next one does (again in pairs):

method call sender=:1.1036 -> dest=:1.1028 serial=5090 path=/com/Skype/Client; interface=com.Skype.API.Client; member=Notify
   string "CHAT #thesender/$thereceiver;2c328ad79b074208 ACTIVITY_TIMESTAMP 1362696353"
method call sender=:1.1036 -> dest=:1.1232 serial=5091 path=/com/Skype/Client; interface=com.Skype.API.Client; member=Notify
   string "CHAT #thesender/$thereceiver;2c328ad79b074208 ACTIVITY_TIMESTAMP 1362696353"
method call sender=:1.1036 -> dest=:1.1028 serial=5092 path=/com/Skype/Client; interface=com.Skype.API.Client; member=Notify
   string "CHATMESSAGE 3535369 STATUS RECEIVED"
method call sender=:1.1036 -> dest=:1.1232 serial=5093 path=/com/Skype/Client; interface=com.Skype.API.Client; member=Notify
   string "CHATMESSAGE 3535369 STATUS RECEIVED"

In the second example it not only shows a CHAT from thesender to thereceiver but it actually shows that a CHATMESSAGE with the serial 3535369 and STATUS has been RECEIVED. Only the latter seems to trigger messageStatusChanged.

The question is: Is the first message supposed to create a CHATMESSAGE {serial} STATUS RECEIVED? If yes: Is this a bug in the Skype client? If no: If CHATMESSAGE is only sent in case of an update to an established chat, should you be listening for a different event?

I don't know the answer yet but maybe this helps.

  • I think right place to solve this would be Skype development forums. They don't support Skype4Py, but they can answer to generic Skype API questions. Because Skype is blackbox, unless Skype themselves responds, we are only doing guesswork here. – Mikko Ohtamaa Mar 08 '13 at 02:26