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

Method GetEventAuth

federationapi/internal/federationclient.go:13–26  ·  view source on GitHub ↗

Functions here are "proxying" calls to the gomatrixserverlib federation client.

(
	ctx context.Context, s gomatrixserverlib.ServerName,
	roomVersion gomatrixserverlib.RoomVersion, roomID, eventID string,
)

Source from the content-addressed store, hash-verified

11// client.
12
13func (a *FederationInternalAPI) GetEventAuth(
14 ctx context.Context, s gomatrixserverlib.ServerName,
15 roomVersion gomatrixserverlib.RoomVersion, roomID, eventID string,
16) (res gomatrixserverlib.RespEventAuth, err error) {
17 ctx, cancel := context.WithTimeout(ctx, time.Second*30)
18 defer cancel()
19 ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) {
20 return a.federation.GetEventAuth(ctx, s, roomVersion, roomID, eventID)
21 })
22 if err != nil {
23 return gomatrixserverlib.RespEventAuth{}, err
24 }
25 return ires.(gomatrixserverlib.RespEventAuth), nil
26}
27
28func (a *FederationInternalAPI) GetUserDevices(
29 ctx context.Context, s gomatrixserverlib.ServerName, userID string,

Callers

nothing calls this directly

Calls 2

GetEventAuthMethod · 0.65

Tested by

no test coverage detected