Microsoft Teams 是否可以更新用户的状态/状态? [英] Does Microsoft Teams have a way to update a user's status/presence?

查看:41
本文介绍了Microsoft Teams 是否可以更新用户的状态/状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近有消息称,Skype For Business 最终将被 Microsoft Teams 下架并取而代之.

Recent news says that Skype For Business is eventually going to be taken down and replaced by Microsoft Teams.

我有几个依赖 Skype For Business 的项目,我使用以下代码使用 2013 lync SDK 更新用户在 Skype For Business 上的状态.

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);
}

话虽如此,我们确实计划将我们的项目转移到 Microsoft Teams.但是,我们查看了当前的 Microsoft Teams SDK,但找不到任何有关更新用户状态的信息.

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?

推荐答案

我很高兴能帮助解决目前在生产或预览中存在的 API,但 Stack Overflow 不是长期路线图讨论的合适平台.这最好留给官方渠道在准备就绪时进行披露.

I'm happy to help with the API's that exist in Production or Preview today but Stack Overflow isn't the right platform for long-term roadmap discussions. That is something best left to official channels to disclose when it's ready.

目前,您是对的,因为 Microsoft Teams SDK 不包含用于与 Presence 交互的 API.这是因为 Teams 本身正在使用 Skype 的 API 镜像 Skype 的存在.您可以使用类似的 API 在您的应用程序中复制此功能.

At the moment, you're correct in that the Microsoft Teams SDK doesn't include APIs for interacting with Presence. This is because Teams itself is mirroring Skype's presence using Skype's API. You can replicate this functionality within your application using the similar APIs.

统一通信 Web API (UCWA).如果您只是想显示 Presence(而不是操纵它),您可以检索 联系状态.要操纵当前用户的状态,可以使用 存在.

A good place to start would be the Unified Communications Web API (UCWA). If you're simply looking to surface Presence (rather than manipulate it), you can retrieve contactPresence. For manipulating the current user's status, you can use presence.

这篇关于Microsoft Teams 是否可以更新用户的状态/状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆