diff --git a/app/migrator/disqus.go b/app/migrator/disqus.go index 5ffe7846..88902e4e 100644 --- a/app/migrator/disqus.go +++ b/app/migrator/disqus.go @@ -118,15 +118,15 @@ func (d *Disqus) convert(r io.Reader, siteID string) (ch chan store.Comment) { c := store.Comment{ ID: comment.UID, Locator: store.Locator{URL: postsMap[comment.Tid.Val], SiteID: siteID}, - User: store.User{ID: "disqus-" + comment.AuthorUserName, Name: comment.AuthorName, IP: comment.IP}, + User: store.User{ID: "disqus_" + comment.AuthorUserName, Name: comment.AuthorName, IP: comment.IP}, Text: d.cleanText(comment.Message), Timestamp: comment.CreatedAt, ParentID: comment.Pid.Val, } - if c.User.ID == "disqus-" { - c.User.ID = "disqus-" + c.User.Name + if c.User.ID == "disqus_" { // empty comment.AuthorUserName from disqus + c.User.ID = "disqus_" + c.User.Name } - if c.ID == "" { + if c.ID == "" { // no comment.UID c.ID = comment.ID } commentsCh <- c diff --git a/app/migrator/disqus_test.go b/app/migrator/disqus_test.go index 96339d58..08687164 100644 --- a/app/migrator/disqus_test.go +++ b/app/migrator/disqus_test.go @@ -52,7 +52,7 @@ func TestDisqus_Convert(t *testing.T) { Text: `
The quick brown fox jumps over the lazy dog.
`, User: store.User{ Name: "Alexander Blah", - ID: "disqus-facebook-1787732238", + ID: "disqus_facebook-1787732238", IP: "178.178.178.178", }, }