Open Doran1990 opened 8 years ago
Code please :)
This is my code: I get all contacts ,and send private message
Collection
Contact contact = (Contact)ary[i]; Chat chat = contact.getPrivateConversation(); ChatMessage chatMessage = null; chatMessage = chat.sendMessage(Message.create().with(Text.plain(msg)).with(Text.rich(link).withLink(link))); }
I send message to all of contacts,sometime get the error: ConnectionException: Cause: While sending message Response: 504 Gateway Timeout Begin Message
{"errorCode":507,"message":"Failure due to: AclNotAvailable."}
End message
at com.samczsun.skype4j.internal.ExceptionHandler.generateException(ExceptionHandler.java:101) at com.samczsun.skype4j.internal.Endpoints$EndpointConnection.connect(Endpoints.java:377) at com.samczsun.skype4j.internal.Endpoints$EndpointConnection.connect(Endpoints.java:307) at com.samczsun.skype4j.internal.Endpoints$EndpointConnection.post(Endpoints.java:291) at com.samczsun.skype4j.internal.chat.ChatImpl.sendMessage(ChatImpl.java:85)
Whilst we are waiting for @samczsun, why not use a for loop for iterating contacts?
for (Contact contact : skype.getAllContacts()) {
// do what you want for each contact here
}
@Sponges sure, can use iterating.
any body help me?
it seem the error occur when send message to msn friend
Could you elaborate on what you mean by "msn friend"?
I can't send message to some firends, but I can send message with skype or web skype. the error is : pls help me how to slove it. com.samczsun.skype4j.exceptions.ConnectionException: Cause: While sending message Response: 400 Bad Request Begin Message
{"errorCode":201,"message":"To field is invalid"}