mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
refactor(essentials): Switches from zoom specific contact class to generic InvitableDirectoryContact class
This commit is contained in:
parent
b2331fa1e5
commit
f922b871a1
3 changed files with 14 additions and 19 deletions
|
|
@ -160,7 +160,19 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||
/// </summary>
|
||||
public interface IInvitableContact
|
||||
{
|
||||
bool IsInvitableContact { get; }
|
||||
}
|
||||
|
||||
public class InvitableDirectoryContact : DirectoryContact, IInvitableContact
|
||||
{
|
||||
[JsonProperty("isInvitableContact")]
|
||||
public bool IsInvitableContact
|
||||
{
|
||||
get
|
||||
{
|
||||
return this is IInvitableContact;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -209,15 +221,6 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||
[JsonProperty("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[JsonProperty("isInvitableContact")]
|
||||
public bool IsInvitableContact
|
||||
{
|
||||
get
|
||||
{
|
||||
return this is IInvitableContact;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty("contactMethods")]
|
||||
public List<ContactMethod> ContactMethods { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -236,14 +236,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used to be able to inplement IInvitableContact on DirectoryContact
|
||||
/// </summary>
|
||||
public class ZoomDirectoryContact : DirectoryContact, IInvitableContact
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class Phonebook
|
||||
{
|
||||
[JsonProperty("Contacts")]
|
||||
|
|
@ -302,7 +294,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||
|
||||
foreach (Contact c in zoomContacts)
|
||||
{
|
||||
var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
||||
var contact = new InvitableDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
|
||||
|
||||
contact.ContactMethods.Add(new ContactMethod() { Number = c.Jid, Device = eContactMethodDevice.Video, CallType = eContactMethodCallType.Video, ContactMethodId = c.Jid });
|
||||
|
||||
|
|
|
|||
|
|
@ -2077,7 +2077,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
|
|||
/// <param name="contact"></param>
|
||||
public override void Dial(IInvitableContact contact)
|
||||
{
|
||||
var ic = contact as zStatus.ZoomDirectoryContact;
|
||||
var ic = contact as InvitableDirectoryContact;
|
||||
|
||||
if (ic != null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue