diff --git a/model/message.go b/model/message.go index 28bb665..f78b916 100644 --- a/model/message.go +++ b/model/message.go @@ -4,18 +4,16 @@ package model type Message struct { Updated uint64 ID string - URL string TS uint64 Author string Plaintext string ThreadID string } -func NewMessage(ID, URL string, TS uint64, Author, Plaintext string, ThreadID string) Message { +func NewMessage(ID string, TS uint64, Author, Plaintext string, ThreadID string) Message { return Message{ Updated: updated(), ID: ID, - URL: URL, TS: TS, Author: Author, Plaintext: Plaintext, diff --git a/slack.go b/slack.go index 043dc73..f7342fa 100644 --- a/slack.go +++ b/slack.go @@ -77,7 +77,7 @@ func newSlackToModelProcess(cfg Config) processFunc { } message := model.Message{} if s.ID != "" && s.Source != "" && s.TS > 0 && s.Thread != "" { - message = model.NewMessage(s.ID, s.Source, s.TS, s.Author, s.Plaintext, s.Thread) + message = model.NewMessage(s.ID, s.TS, s.Author, s.Plaintext, s.Thread) } thread := model.Thread{} if s.Thread != "" && s.Source != "" && s.TS > 0 && s.Event != "" { diff --git a/slack_test.go b/slack_test.go index 1fb4be0..cb00785 100644 --- a/slack_test.go +++ b/slack_test.go @@ -45,7 +45,6 @@ func TestSlackToModelPipeline(t *testing.T) { ), Message: model.NewMessage( "1712927439.728409/1712927439", - "https://renderinc.slack.com/archives/C06U1DDBBU4/p1712927439728409", 1712927439, "Opsgenie for Alert Management", "At least one alertconfig run has failed unexpectedly.\nDashboard: \nPanel: \nSource: ", diff --git a/storage_test.go b/storage_test.go index cda4719..02114bf 100644 --- a/storage_test.go +++ b/storage_test.go @@ -67,7 +67,6 @@ func TestStorage(t *testing.T) { t.Run("upsert get message", func(t *testing.T) { m := model.NewMessage( "ID", - "URL", 1, "Author", "Plaintext",