This commit is contained in:
Till Faelligen 2021-07-31 16:26:15 +02:00
parent 0889ceeac2
commit bdc30e57a5
2 changed files with 10 additions and 0 deletions

View file

@ -97,3 +97,6 @@ type OutputPresenceData struct {
LastActiveAgo int64 `json:"last_active_ago,omitempty"`
StreamPos types2.StreamPosition `json:"stream_pos"`
}
type FederationPresenceData struct {
}

View file

@ -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")
}