You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With all event classes ultimately being mere wrappers around QJsonObject, there's no particular reason we shouldn't enable their serialisation by simply calling Event::fullJson(). There used to be Event::toJson() before but it was deemed confusing as usually it was Event::contentJson() (that didn't exist back then) actually needed. That being said, we now have (automatically generated but no less superfluous) CreateRoomJob::StateEvent that duplicates StateEvent in terms of structure, except that it actually keeps the type, the state key, and the content separate. It can be argued whether this model might be better for all events (eliminating the need for Event::editJson() kludge?) but it certainly is duplication serving no good purpose.
The text was updated successfully, but these errors were encountered:
With all event classes ultimately being mere wrappers around
QJsonObject
, there's no particular reason we shouldn't enable their serialisation by simply callingEvent::fullJson()
. There used to beEvent::toJson()
before but it was deemed confusing as usually it wasEvent::contentJson()
(that didn't exist back then) actually needed. That being said, we now have (automatically generated but no less superfluous)CreateRoomJob::StateEvent
that duplicatesStateEvent
in terms of structure, except that it actually keeps the type, the state key, and the content separate. It can be argued whether this model might be better for all events (eliminating the need forEvent::editJson()
kludge?) but it certainly is duplication serving no good purpose.The text was updated successfully, but these errors were encountered: