Rename messageContent field to messageSource; content will soon be HTML

This commit is contained in:
fr33domlover 2019-06-02 12:04:35 +00:00
parent c7a563bd15
commit facf4d7f3e
5 changed files with 7 additions and 5 deletions

View file

@ -321,7 +321,7 @@ RemoteDiscussion
Message
created UTCTime
content Text -- Assume this is Pandoc Markdown
source Text -- Pandoc Markdown
parent MessageId Maybe
root DiscussionId

View file

@ -812,7 +812,7 @@ handleProjectInbox now shrRecip prjRecip iidSender hSender raidSender body raw a
}
mid <- insert Message
{ messageCreated = published
, messageContent = content
, messageSource = content
, messageParent =
case meparent of
Just (Left midParent) -> Just midParent
@ -1327,7 +1327,7 @@ handleOutboxNote host (Note mluNote luAttrib aud muParent muContext mpublished c
now <- liftIO getCurrentTime
mid <- insert Message
{ messageCreated = now
, messageContent = content
, messageSource = content
, messageParent =
case meparent of
Just (Left midParent) -> Just midParent

View file

@ -164,7 +164,7 @@ getDiscussionMessage shr lmid = do
, noteReplyTo = Just $ fromMaybe uContext muParent
, noteContext = Just uContext
, notePublished = Just $ messageCreated m
, noteContent = messageContent m
, noteContent = messageSource m
}
selectRep $ do
provideAP $ pure doc

View file

@ -486,6 +486,8 @@ changes hLocal ctx =
, renameEntity "ProjectAccess" "RoleAccess"
-- 84
, renameUnique "RoleAccess" "UniqueProjectAccess" "UniqueRoleAccess"
-- 85
, renameField "Message" "content" "source"
]
migrateDB :: MonadIO m => Text -> HashidsContext -> ReaderT SqlBackend m (Either Text (Int, Int))

View file

@ -22,6 +22,6 @@ $# <http://creativecommons.org/publicdomain/zero/1.0/>.
<a href="#{renderFedURI $ l2f h luMsg}"}>
#{showTime $ messageCreated msg}
<div>
^{showContent $ messageContent msg}
^{showContent $ messageSource msg}
<div>
<a href=@{reply msgid}>reply