Add missing GAB fields

Added business street and department.

References: KOE-192.
Signed-off-by: Manfred Kutas <m.kutas@kopano.com>
This commit is contained in:
Manfred Kutas 2020-07-15 11:28:19 -03:00
parent 5120ddad99
commit df146f6141
4 changed files with 32 additions and 14 deletions

View File

@ -1,17 +1,17 @@
/// Copyright 2019 Kopano b.v.
///
///
/// This program is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License, version 3,
/// as published by the Free Software Foundation.
///
///
/// This program is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
/// GNU Affero General Public License for more details.
///
///
/// You should have received a copy of the GNU Affero General Public License
/// along with this program.If not, see<http://www.gnu.org/licenses/>.
///
///
/// Consult LICENSE file for details
using System;
@ -249,7 +249,7 @@ namespace Acacia.Features.GAB
}
}
public const string PROP_LAST_PROCESSED = "ZPushLastProcessed";
public const string PROP_SEQUENCE_CHUNK = "ZPushSequenceChunk";
@ -607,6 +607,7 @@ namespace Acacia.Features.GAB
contact.Email1AddressType = "SMTP";
}
if (Get<string>(value, "companyName") != null) contact.CompanyName = Get<string>(value, "companyName");
if (Get<string>(value, "department") != null) contact.Department = Get<string>(value, "department");
if (Get<string>(value, "officeLocation") != null) contact.OfficeLocation = Get<string>(value, "officeLocation");
if (Get<string>(value, "businessTelephoneNumber") != null) contact.BusinessTelephoneNumber = Get<string>(value, "businessTelephoneNumber");
if (Get<string>(value, "mobileTelephoneNumber") != null) contact.MobileTelephoneNumber = Get<string>(value, "mobileTelephoneNumber");
@ -622,6 +623,7 @@ namespace Acacia.Features.GAB
if (Get<string>(value, "businessAddressPostalCode") != null) contact.BusinessAddressPostalCode = Get<string>(value, "businessAddressPostalCode");
if (Get<string>(value, "businessAddressPostOfficeBox") != null) contact.BusinessAddressPostOfficeBox = Get<string>(value, "businessAddressPostOfficeBox");
if (Get<string>(value, "businessAddressStateOrProvince") != null) contact.BusinessAddressState = Get<string>(value, "businessAddressStateOrProvince");
if (Get<string>(value, "businessAddressStreet") != null) contact.BusinessAddressStreet = Get<string>(value, "businessAddressStreet");
if (Get<string>(value, "language") != null) contact.Language = Get<string>(value, "language");
// Thumbnail
@ -879,7 +881,7 @@ namespace Acacia.Features.GAB
_items = null;
}
}
}
}
public ItemCache(GABHandler gab)
{

View File

@ -1,17 +1,17 @@
/// Copyright 2016 Kopano b.v.
///
///
/// This program is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License, version 3,
/// as published by the Free Software Foundation.
///
///
/// This program is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
/// GNU Affero General Public License for more details.
///
///
/// You should have received a copy of the GNU Affero General Public License
/// along with this program.If not, see<http://www.gnu.org/licenses/>.
///
///
/// Consult LICENSE file for details
using System;
@ -36,6 +36,7 @@ namespace Acacia.Stubs
string Email1Address { get; set; }
string Email1AddressType { get; set; }
string CompanyName { get; set; }
string Department { get; set; }
string JobTitle { get; set; }
string OfficeLocation { get; set; }
string BusinessTelephoneNumber { get; set; }
@ -49,6 +50,7 @@ namespace Acacia.Stubs
string BusinessAddressPostalCode { get; set; }
string BusinessAddressPostOfficeBox { get; set; }
string BusinessAddressState { get; set; }
string BusinessAddressStreet { get; set; }
string Language { get; set; }
void SetPicture(string path);

View File

@ -1,17 +1,17 @@
/// Copyright 2016 Kopano b.v.
///
///
/// This program is free software: you can redistribute it and/or modify
/// it under the terms of the GNU Affero General Public License, version 3,
/// as published by the Free Software Foundation.
///
///
/// This program is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
/// GNU Affero General Public License for more details.
///
///
/// You should have received a copy of the GNU Affero General Public License
/// along with this program.If not, see<http://www.gnu.org/licenses/>.
///
///
/// Consult LICENSE file for details
using Acacia.Utils;
@ -94,6 +94,12 @@ namespace Acacia.Stubs.OutlookWrappers
set { _item.CompanyName = value; }
}
public string Department
{
get { return _item.Department; }
set { _item.Department = value; }
}
public string JobTitle
{
get { return _item.JobTitle; }
@ -172,6 +178,12 @@ namespace Acacia.Stubs.OutlookWrappers
set { _item.BusinessAddressState = value; }
}
public string BusinessAddressStreet
{
get { return _item.BusinessAddressStreet; }
set { _item.BusinessAddressStreet = value; }
}
public string Language
{
get { return _item.Language; }

View File

@ -103,6 +103,7 @@ namespace Acacia.ZPush
if (token == "username") return _contact.CustomerID ?? "";
if (token == "title") return _contact.JobTitle ?? "";
if (token == "company") return _contact.CompanyName ?? "";
if (token == "department") return _contact.Department ?? "";
if (token == "office") return _contact.OfficeLocation ?? "";
if (token == "phone") return _contact.BusinessTelephoneNumber ?? _contact.MobileTelephoneNumber ?? "";
if (token == "primary_email") return _contact.Email1Address ?? "";
@ -111,6 +112,7 @@ namespace Acacia.ZPush
if (token == "state") return _contact.BusinessAddressState ?? "";
if (token == "zipcode") return _contact.BusinessAddressPostalCode ?? "";
if (token == "country") return _contact.BusinessAddressState ?? "";
if (token == "street") return _contact.BusinessAddressStreet ?? "";
if (token == "phone_business") return _contact.BusinessTelephoneNumber ?? "";
if (token == "phone_fax") return _contact.BusinessFaxNumber ?? "";
if (token == "phone_home") return _contact.HomeTelephoneNumber ?? "";