From 715d9e4a858423e8bd9492e3a88d591670349bab Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Thu, 9 Jun 2022 15:11:07 +0200 Subject: 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. --- lib/room.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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( 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));) -- cgit v1.2.3