diff --git a/app/migrator/disqus.go b/app/migrator/disqus.go index b6fa2eb1..5ffe7846 100644 --- a/app/migrator/disqus.go +++ b/app/migrator/disqus.go @@ -118,13 +118,13 @@ 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: 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 == "" { - c.User.ID = "import_" + c.User.Name + if c.User.ID == "disqus-" { + c.User.ID = "disqus-" + c.User.Name } if c.ID == "" { c.ID = comment.ID diff --git a/app/migrator/disqus_test.go b/app/migrator/disqus_test.go index 85fbe706..96339d58 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.

some link

`, User: store.User{ Name: "Alexander Blah", - ID: "facebook-1787732238", + ID: "disqus-facebook-1787732238", IP: "178.178.178.178", }, }