-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRingCentralChannels.cs
42 lines (37 loc) · 1.25 KB
/
RingCentralChannels.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
namespace Bot.Builder.Community.Adapters.RingCentral
{
/// <summary>
/// Ids of channels supported by the RingCentral adapter.
/// </summary>
public static class RingCentralChannels
{
/// <summary>
/// RingCentral WhatsApp channel.
/// </summary>
public const string WhatsApp = "whatsapp";
/// <summary>
/// RingCentral unspecific channel.
/// </summary>
public const string Unspecific = "unspecific";
/// <summary>
/// Gets the adapter's channel id based on the RingCentral message/resource type.
/// </summary>
/// <param name="resourceType">RingCentrla resource type.</param>
/// <returns>String name of the channel.</returns>
public static string GetFromResourceType(string resourceType)
{
string channel;
switch (resourceType)
{
case string rt when rt.Equals("whats_app/message", StringComparison.InvariantCultureIgnoreCase):
channel = WhatsApp;
break;
default:
channel = Unspecific;
break;
}
return channel;
}
}
}