MCPcopy Create free account
hub / github.com/daodst/chat / GetEvent

Method GetEvent

federationapi/internal/federationclient.go:125–137  ·  view source on GitHub ↗
(
	ctx context.Context, s gomatrixserverlib.ServerName, eventID string,
)

Source from the content-addressed store, hash-verified

123}
124
125func (a *FederationInternalAPI) GetEvent(
126 ctx context.Context, s gomatrixserverlib.ServerName, eventID string,
127) (res gomatrixserverlib.Transaction, err error) {
128 ctx, cancel := context.WithTimeout(ctx, time.Second*30)
129 defer cancel()
130 ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) {
131 return a.federation.GetEvent(ctx, s, eventID)
132 })
133 if err != nil {
134 return gomatrixserverlib.Transaction{}, err
135 }
136 return ires.(gomatrixserverlib.Transaction), nil
137}
138
139func (a *FederationInternalAPI) LookupServerKeys(
140 ctx context.Context, s gomatrixserverlib.ServerName, keyRequests map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.Timestamp,

Callers

nothing calls this directly

Calls 2

GetEventMethod · 0.65

Tested by

no test coverage detected