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

Method LookupState

federationapi/internal/federationclient.go:82–94  ·  view source on GitHub ↗
(
	ctx context.Context, s gomatrixserverlib.ServerName, roomID, eventID string, roomVersion gomatrixserverlib.RoomVersion,
)

Source from the content-addressed store, hash-verified

80}
81
82func (a *FederationInternalAPI) LookupState(
83 ctx context.Context, s gomatrixserverlib.ServerName, roomID, eventID string, roomVersion gomatrixserverlib.RoomVersion,
84) (res gomatrixserverlib.RespState, err error) {
85 ctx, cancel := context.WithTimeout(ctx, time.Second*30)
86 defer cancel()
87 ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) {
88 return a.federation.LookupState(ctx, s, roomID, eventID, roomVersion)
89 })
90 if err != nil {
91 return gomatrixserverlib.RespState{}, err
92 }
93 return ires.(gomatrixserverlib.RespState), nil
94}
95
96func (a *FederationInternalAPI) LookupStateIDs(
97 ctx context.Context, s gomatrixserverlib.ServerName, roomID, eventID string,

Callers

nothing calls this directly

Calls 2

LookupStateMethod · 0.65

Tested by

no test coverage detected