diff --git a/eduserver/api/output.go b/eduserver/api/output.go index 2fbc08b54..0efe0b732 100644 --- a/eduserver/api/output.go +++ b/eduserver/api/output.go @@ -97,3 +97,6 @@ type OutputPresenceData struct { LastActiveAgo int64 `json:"last_active_ago,omitempty"` StreamPos types2.StreamPosition `json:"stream_pos"` } + +type FederationPresenceData struct { +} diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index 5f214e0fc..cb4bc345d 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -502,6 +502,13 @@ func (t *txnReq) processEDUs(ctx context.Context) { } } } + case gomatrixserverlib.MPresence: + payload := eduserverAPI.FederationPresenceData{} + util.GetLogger(ctx).Debug("%s", e.Content) + if err := json.Unmarshal(e.Content, &payload); err != nil { + util.GetLogger(ctx).WithError(err).Error("Failed to unmarshal presence event") + continue + } default: util.GetLogger(ctx).WithField("type", e.Type).Debug("Unhandled EDU") }