@@ -935,7 +935,7 @@ publishPost uId pc = commitedTransactionallyUpdate $ do
935935 pId' <- manipulateParams createPostRowQ (uId, postCreationTags pc) >>= firstRow
936936 case pId' of
937937 (Just (Only pId)) -> do
938− traversePrepared_ createPostElementRowsQ $ elementsToRows pId (postCreationBody pc)
938+ traversePrepared_ createPostElementRowsQ $ elementsToRows pId (map stripPostElement $ postCreationBody pc)
939939 return pId
940940 _ -> lift $ S.throwError S.err404
941941
@@ -1043,9 +1043,9 @@ getMessagesInGroupChat selfId gId mId lim dir = do
10431043 return . catMaybes . map restoreMessage $ resp
10441044
10451045sendMessage :: UserId -> MessageCreation -> StaticPQ MessageId
1046−sendMessage selfId (MessageCreation (Just gId) uId@Nothing body) = do
1046+sendMessage selfId (MessageCreation (Just gId) uId@Nothing (Jsonb body)) = do
10471047 _ <- getGroupChatForUser selfId gId
1048− (Only mId) <- manipulateParams createMessageQ (selfId, Just gId, uId, body)
1048+ (Only mId) <- manipulateParams createMessageQ (selfId, Just gId, uId, Jsonb $ stripPostElement body)
10491049 >>= firstRow >>= fromMaybe500
10501050 return mId
10511051sendMessage selfId (MessageCreation gId@Nothing (Just uId) body) = do