diff --git a/SparkleLib/SparkleChangeSet.cs b/SparkleLib/SparkleChangeSet.cs index 3961c39c..f0cfdd03 100644 --- a/SparkleLib/SparkleChangeSet.cs +++ b/SparkleLib/SparkleChangeSet.cs @@ -76,10 +76,18 @@ namespace SparkleLib { public class SparkleNote { - public string UserName; - public string UserEmail; + public SparkleUser User; public DateTime Timestamp; public string Body; } + + + public class SparkleUser { + + public string Name; + public string Email; + + public string PublicKey; + } } diff --git a/SparkleLib/SparkleRepoBase.cs b/SparkleLib/SparkleRepoBase.cs index 9229e669..cdb03ba5 100644 --- a/SparkleLib/SparkleRepoBase.cs +++ b/SparkleLib/SparkleRepoBase.cs @@ -365,8 +365,10 @@ namespace SparkleLib { if (match_notes.Success) { SparkleNote note = new SparkleNote () { - UserName = match_notes.Groups [1].Value, - UserEmail = match_notes.Groups [2].Value, + User = new SparkleUser () { + Name = match_notes.Groups [1].Value, + Email = match_notes.Groups [2].Value + }, Timestamp = new DateTime (1970, 1, 1).AddSeconds (int.Parse (match_notes.Groups [3].Value)), Body = match_notes.Groups [4].Value }; @@ -448,7 +450,7 @@ namespace SparkleLib { bool note_added = false; foreach (string added in change_set.Added) { - if (added.StartsWith (".notes")) { + if (added.Contains (".notes")) { if (NewNote != null) NewNote (change_set.UserName, change_set.UserEmail);