Compare commits
3 Commits
b9f5a26b27
...
v0.0.0.14
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b9ad5bf3c | |||
| 8a316600b5 | |||
| 0f61b4cd31 |
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
; Erfordert Inno Setup 6.x (https://jrsoftware.org/isinfo.php)
|
; Erfordert Inno Setup 6.x (https://jrsoftware.org/isinfo.php)
|
||||||
|
|
||||||
#define MyAppName "Starface Outlook Sync"
|
#define MyAppName "Starface Outlook Sync"
|
||||||
#define MyAppVersion "0.0.0.12"
|
#define MyAppVersion "0.0.0.14"
|
||||||
#define MyAppPublisher "HackerSoft - Hacker-Net Telekommunikation"
|
#define MyAppPublisher "HackerSoft - Hacker-Net Telekommunikation"
|
||||||
#define MyAppURL "https://www.hacker-net.de"
|
#define MyAppURL "https://www.hacker-net.de"
|
||||||
#define MyAppExeName "StarfaceOutlookSync.exe"
|
#define MyAppExeName "StarfaceOutlookSync.exe"
|
||||||
|
|||||||
@@ -252,11 +252,20 @@ namespace StarfaceOutlookSync.Services
|
|||||||
if (book.Type == "user" && !string.IsNullOrEmpty(book.UserId))
|
if (book.Type == "user" && !string.IsNullOrEmpty(book.UserId))
|
||||||
query = $"?userId={book.UserId}";
|
query = $"?userId={book.UserId}";
|
||||||
|
|
||||||
var content = new StringContent(sfContact.ToString(), Encoding.UTF8, "application/json");
|
var body = sfContact.ToString();
|
||||||
var resp = await _http.PostAsync($"{_baseUrl}/contacts{query}", content);
|
OnDebug?.Invoke($"POST /contacts{query} Body:\n{body}");
|
||||||
if (!resp.IsSuccessStatusCode) return null;
|
|
||||||
|
|
||||||
var created = JObject.Parse(await resp.Content.ReadAsStringAsync());
|
var content = new StringContent(body, Encoding.UTF8, "application/json");
|
||||||
|
var resp = await _http.PostAsync($"{_baseUrl}/contacts{query}", content);
|
||||||
|
var respBody = await resp.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
if (!resp.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
OnDebug?.Invoke($"POST /contacts fehlgeschlagen: {(int)resp.StatusCode} {resp.StatusCode}\n{respBody}");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var created = JObject.Parse(respBody);
|
||||||
return MapFromStarface(created);
|
return MapFromStarface(created);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ namespace StarfaceOutlookSync.Services
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Neu -> in Starface erstellen
|
// Neu -> in Starface erstellen
|
||||||
|
Log($" Erstelle in Starface: {oc.DisplayName}");
|
||||||
var created = await starface.CreateContactAsync(oc, profile.StarfaceAddressBook);
|
var created = await starface.CreateContactAsync(oc, profile.StarfaceAddressBook);
|
||||||
if (created != null && !string.IsNullOrEmpty(created.StarfaceId))
|
if (created != null && !string.IsNullOrEmpty(created.StarfaceId))
|
||||||
{
|
{
|
||||||
@@ -260,6 +261,11 @@ namespace StarfaceOutlookSync.Services
|
|||||||
result.Created++;
|
result.Created++;
|
||||||
Log($" Erstellt (OL->SF): {oc.DisplayName}");
|
Log($" Erstellt (OL->SF): {oc.DisplayName}");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log($" FEHLER: Kontakt konnte nicht erstellt werden: {oc.DisplayName}");
|
||||||
|
result.Errors++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
<AssemblyTitle>Starface Outlook Sync</AssemblyTitle>
|
<AssemblyTitle>Starface Outlook Sync</AssemblyTitle>
|
||||||
<Company>HackerSoft - Hacker-Net Telekommunikation</Company>
|
<Company>HackerSoft - Hacker-Net Telekommunikation</Company>
|
||||||
<Product>Starface Outlook Sync</Product>
|
<Product>Starface Outlook Sync</Product>
|
||||||
<Version>0.0.0.12</Version>
|
<Version>0.0.0.14</Version>
|
||||||
<AssemblyVersion>0.0.0.12</AssemblyVersion>
|
<AssemblyVersion>0.0.0.14</AssemblyVersion>
|
||||||
<FileVersion>0.0.0.12</FileVersion>
|
<FileVersion>0.0.0.14</FileVersion>
|
||||||
<Description>Synchronisiert Outlook-Kontakte mit Starface Telefonanlage</Description>
|
<Description>Synchronisiert Outlook-Kontakte mit Starface Telefonanlage</Description>
|
||||||
<Copyright>Stefan Hacker - HackerSoft</Copyright>
|
<Copyright>Stefan Hacker - HackerSoft</Copyright>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace StarfaceOutlookSync.UI
|
|||||||
|
|
||||||
var lblVersion = new Label
|
var lblVersion = new Label
|
||||||
{
|
{
|
||||||
Text = "Version 0.0.0.12",
|
Text = "Version 0.0.0.14",
|
||||||
Left = 0, Top = 56, Width = 340, Height = 20,
|
Left = 0, Top = 56, Width = 340, Height = 20,
|
||||||
TextAlign = ContentAlignment.MiddleCenter,
|
TextAlign = ContentAlignment.MiddleCenter,
|
||||||
ForeColor = Color.Gray
|
ForeColor = Color.Gray
|
||||||
|
|||||||
Reference in New Issue
Block a user