Search code examples
c#lync-client-sdkskype-for-business

React to "Out of Office" status in Skype for Business


The Lync 2013 SDK publishes a ContactAvailability property for contacts, with values as described here:

https://msdn.microsoft.com/en-us/library/microsoft.lync.controls.contactavailability_di_3_uc_ocs14mreflyncwpf.aspx

Each of the values in this enumeration is an indication of the color and pattern shown beside the contact in Lync 2013.

It seems to me that the Skype for Business 2015 client has added a new color, coinciding with an Outlook calendar entry that is tagged with "Out of Office", as seen here:

enter image description here

The Lync 2013 Client SDK simply returns the Free enumeration value (same as green) for this new(??) purple status indicator.

My question is, does anyone know of a way to detect when a contact's status is such that SfB would display that contact's icon with a purple "Out of Office" status indicator? I haven't been able to find any documentation on this.

Thanks.


Solution

  • I'm not sure from a Lync Client SDK point of view, as I haven't done much with presence in the Lync Client SDK.

    In a UMCA application where you have subscribed to presence changes you get a RemotePresentityNotification object you can get the AggregatedPresenceState.Activity.ActivityToken which will be set to the string "out-of-office" as defined in the MS-Pres spec.

    I assume there will be some way to get the ActivityToken from the Lync Client SDK. My guess would be asking for ContactInformationType.ActivityId or Activity from the lync user presence.