So what if we want to set that programmatically? What is we want to have a bot user that displays the current temperature in the server room? The Lync client SDK once again provides an easy way to do this.
Step 1. Get an instance of your local Lync client.
LyncClient lc;
lc = LyncClient.GetClient();
Step 2. Use my setLyncNote function below.
private void setLyncNote(string newNote)
{
try
{
Dictionary<PublishableContactInformationType, object> publishData = new Dictionary<PublishableContactInformationType, object>();
publishData.Add(PublishableContactInformationType.PersonalNote, newNote);
object[] asyncState = { lc.Self };
lc.Self.BeginPublishContactInformation(publishData, null, asyncState);
}
catch
{ }
}
Note: You can see where we add the type of data to the publishData dictionary above. You can have multiple types of information here. You can also change the availability and activity id of your user at the same if you wanted.
That will conclude this weeks blog post. If you have any questions hit me up on twitter.
Doug Routledge, C# Lync, Skype for Business, SQL, Exchange, UC Developer BridgeOC
Twitter - @droutledge @ndbridge
Twitter - @droutledge @ndbridge
No comments:
Post a Comment
Any spam comments will be deleted and your user account will be disabled.