Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Dec 11, 2024
1 parent 8f0d8e8 commit 5a20eff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/v2/stf/stf.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,21 +361,22 @@ func (s STF[T]) runTxMsgs(
events = append(events, e)
}

// add static event (message.action and message.module)
// create message event (including message.action and message.module)
events = append(events, event.Event{
MsgIndex: int32(i + 1),
EventIndex: int32(len(execCtx.events) + 1),
Type: "message",
Attributes: func() ([]appdata.EventAttribute, error) {
typeURL := msgTypeURL(msg)
return []appdata.EventAttribute{
{Key: "message.action", Value: typeURL},
{Key: "message.action", Value: "/" + typeURL},
{Key: "message.module", Value: getModuleNameFromTypeURL(typeURL)},
}, nil
},
Data: func() (json.RawMessage, error) {
typeURL := msgTypeURL(msg)
attrs := []appdata.EventAttribute{
{Key: "message.action", Value: typeURL},
{Key: "message.action", Value: "/" + typeURL},
{Key: "message.module", Value: getModuleNameFromTypeURL(typeURL)},
}

Expand Down

0 comments on commit 5a20eff

Please sign in to comment.