changeset 1426:4cf2b73e63aa

pages (forums/view): use rich content to post a reply
author Goffi <goffi@goffi.org>
date Sat, 01 May 2021 19:05:16 +0200
parents bcd6ad99b2b0
children eaf36fffcbdb
files libervia/pages/forums/view/page_meta.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/pages/forums/view/page_meta.py	Sat May 01 19:05:16 2021 +0200
+++ b/libervia/pages/forums/view/page_meta.py	Sat May 01 19:05:16 2021 +0200
@@ -29,8 +29,7 @@
     request.template_data["login_url"] = self.getPageRedirectURL(request)
 
 
-@defer.inlineCallbacks
-def on_data_post(self, request):
+async def on_data_post(self, request):
     profile = self.getProfile(request)
     if profile is None:
         self.pageError(request, C.HTTP_FORBIDDEN)
@@ -40,9 +39,9 @@
 
         if not body:
             self.pageError(request, C.HTTP_BAD_REQUEST)
-        mb_data = {"content": body}
+        mb_data = {"content_rich": body}
         try:
-            yield self.host.bridgeCall(
+            await self.host.bridgeCall(
                 "mbSend", service, node, data_format.serialise(mb_data), profile)
         except Exception as e:
             if "forbidden" in str(e):