diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-09 15:11:07 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-09-04 18:42:11 +0200 |
commit | 715d9e4a858423e8bd9492e3a88d591670349bab (patch) | |
tree | 8ca26ac134eab9c3a036f8606a4709f52ecbbefd | |
parent | 7251d6856993a08dd8ec1d4965a310e4cf8e97d3 (diff) | |
download | libquotient-715d9e4a858423e8bd9492e3a88d591670349bab.tar.gz libquotient-715d9e4a858423e8bd9492e3a88d591670349bab.zip |
Room::setTags(): skip full-blown TagEvent creation
TagEvent is only created to immediately extract content JSON from it;
at the same rate content JSON can be generated directly from content.
-rw-r--r-- | lib/room.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 6bed9b56..24e348e3 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1349,7 +1349,7 @@ void Room::setTags(TagsMap newTags, ActionScope applyOn) d->setTags(move(newTags)); connection()->callApi<SetAccountDataPerRoomJob>( localUser()->id(), id(), TagEvent::TypeId, - TagEvent(d->tags).contentJson()); + Quotient::toJson(TagEvent::content_type { d->tags })); if (propagate) { for (auto* r = this; (r = r->successor(joinStates));) |