Recent news says that Skype For Business is eventually going to be taken down and replaced by Microsoft Teams.
I have a few projects that rely on Skype For Business and I use the following code to update a user's presence on Skype For Business using the 2013 lync SDK.
public static void PublishPresence(ContactAvailability contactAvailability)
{
var publishData = new Dictionary<PublishableContactInformationType, object>
{
{PublishableContactInformationType.Availability, contactAvailability}
};
SendPublishRequest(publishData);
}
private static void SendPublishRequest(Dictionary<PublishableContactInformationType, object> publishData)
{
try
{
PublishContactInformation(publishData);
}
catch (Exception exception)
{
_logger.Error("Cannot publish presence to Lync. Error: " + exception);
}
}
public static void PublishContactInformation(Dictionary<PublishableContactInformationType, object> publishData)
{
LyncClient lyncClient = LyncClient.GetClient();
lyncClient.Self.BeginPublishContactInformation(publishData, ar => lyncClient.Self.EndPublishContactInformation(ar), null);
}
With that said we do plan on moving our projects to Microsoft Teams. However, we looked at the current Microsoft Teams SDK and we could not find any information about updating a user's presence.
Is something similar not listed on their documentation that allows myself to change my own status/presence?