Skip to content

Commit 9d72b46

Browse files
committed
feat: make formigo.Message JSON encodable
1 parent 32ae9a6 commit 9d72b46

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/messages/messages.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import (
66
)
77

88
type Message struct {
9-
Ctx context.Context
10-
CancelCtx context.CancelFunc
11-
Msg interface{}
12-
MsgId interface{}
13-
ReceivedTime time.Time
9+
Ctx context.Context `json:"-"` // Exclude from JSON
10+
CancelCtx context.CancelFunc `json:"-"` // Exclude from JSON
11+
MsgId interface{} `json:"id"`
12+
Msg interface{} `json:"content"`
13+
ReceivedTime time.Time `json:"receivedAt"`
1414
}
1515

1616
func (m Message) Id() interface{} {

0 commit comments

Comments
 (0)