0

I am using this Gist from Tom Morgan to test sending IM's. I'm logged into my Lync 2013 client and when i start the app it works, i get my test message immediately assuming i acknowledge/click on the pop-up notification to accept the new conversation.

If however i don't click the pop-up, there seems to be a random 20-30 second delay before the BeginSendInstantMessage is fired and the message appears.

This delay also exists if i close the visual studio app, but leave the conversation window open and then re-run the app. It won't show me the new conversation pop-up this time and even though the existing conversation window has focus.. there is still a 30 second delay before the message appears.

Can this behavior be changed so my message is immediately delivered ?

Thank you, fLo

Flo Woo
  • 949
  • 1
  • 12
  • 26

1 Answers1

0

Firstly, thanks for name-checking the Gist - glad someone is using it!

I think what you're describing is built into how Lync works - this 30 second is something you see even if you send it from another Lync client, if you ignore the popup the message is still delivered after that time.

I think the reason for it is that you might be signed in on many different devices (different endpoints). Lync will signal your message to all endpoints and wait to see what you do. If you accept the message on a specific endpoint, then all future messages for that conversation will go there. However, if you ignore it, eventually the Lync client will auto-accept your message anyway.

This behaviour was (if I recall) subtly different in Lync 2010, where the client would automatically accept the message immediately when showing the popup.

What's happening when you leave the conversation window open and re-run the app is that you're getting stuck between two things. The first thing is that you're creating a brand-new conversation, with a new conversation ID etc etc. The Lync client is doing its "ah, new conversation, lets wait and see if other endpoints pick it up". At the same time however, the Lync client is "clever" enough to guess that you probably don't mean to have two conversations with the same recipient, and is grouping together your conversations into one window. That's why you don't get the popup (Lync client grouping your conversation) but do get the delay (Lync client handling new conversations), and then the message arriving in the same window.(Lync client grouping your conversation).

It's a particular edge case which the client doesn't deal particularly well with, but I don't think there is any nice way of fixing it.

Tom Morgan
  • 2,355
  • 18
  • 29
  • great, thanks for taking time to reply. Very helpful. I was trying to use Lync for a ChatBot style alerting system but for adhoc single lines messages that don't really confirm to a 'conversation' ... it seems Lync can't be told to play nice. I have tested the persistent chat SDK and that seems to work OK but the goal was to allow sending to individual as well as rooms. Oh well. – Flo Woo May 22 '15 at 00:49