@@ -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,14 +1043,14 @@ 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
1051−sendMessage selfId (MessageCreation gId@Nothing (Just uId) body) = do
1051+sendMessage selfId (MessageCreation gId@Nothing (Just uId) (Jsonb body)) = do
10521052 verifyUsers [uId]
1053− (Only mId) <- manipulateParams createMessageQ (selfId, gId, Just uId, body)
1053+ (Only mId) <- manipulateParams createMessageQ (selfId, gId, Just uId, Jsonb $ stripPostElement body)
10541054 >>= firstRow >>= fromMaybe500
10551055 return mId
10561056sendMessage _ _ = lift $ S.throwError S.err400