matrix-org / gomatrixserverlib

Go library for matrix federation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider making event content types public

Cnly opened this issue · comments

commented

Currently Dendrite and gomatrixserverlib have a number of duplicate event content types (CreateContent, PowerLevelContent, etc.). We should consider replacing the Dendrite versions with the gomatrixserverlib versions. This will reduce redundant code and also allow Dendrite to easily do power level checks, etc..

Note that we'll probably want to add JSON keys to gomatrixserverlib's event content types first.

Sounds fine to me. Looks like things are missing from both implementations at the moment.

I think these types would better live in gomatrix (with maybe alias types in gomatrixserverlib) so that client apps can benefit from them.

commented

I looked into gomatrix and found that it seems to have its own ways to keep track of events of some types for now, e.g. GetMembershipState. But generally it looks like gomatrix is lacking maintenance... So perhaps we'll still keep these types here, making them public, and consider replacing the stuff in gomatrix later?

Right, makes sense.