Terrance/SkPy

{"errorCode":804,"message":"Quarantine limit Exceeded"} when sending message to some contacts

qwertyNodes opened this issue · 3 comments

This is strange, because not for all contacts I get such an error. Does anybody know what it means?

Without context, I'm to assume you're sending a sufficient number of messages to trigger Skype for Web rate limits. As a reminder, this library is a wrapper around the Skype web client, which does not expect (and will likely defend against) automated usage.

I have figured out what the problem is. This error causes when the contact has not accepted the conversation. For unaccepted conversations, you can send max 5 messages after which you will receive this error. So in order not to risk your account, you need to check whether the contact is authorized before sending the message:

client.contacts[contact_username].authorised: bool

Maybe it will help someone.

Thank you Terrance for your work.

Better to check this way because "authorized" property can absent for some users


    # conversation accepted
    user.chat.raw['properties']['conversationstatus'] = 'Accepted'

    # conversation pending with messages
    user.chat.raw['properties']['conversationstatus'] = 'AcceptPendingSender'

    # no conversations at the moment
    user.chat.raw = None