mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 15:14:50 +09:00
Rename messageContent field to messageSource; content will soon be HTML
This commit is contained in:
parent
c7a563bd15
commit
facf4d7f3e
5 changed files with 7 additions and 5 deletions
|
@ -321,7 +321,7 @@ RemoteDiscussion
|
|||
|
||||
Message
|
||||
created UTCTime
|
||||
content Text -- Assume this is Pandoc Markdown
|
||||
source Text -- Pandoc Markdown
|
||||
parent MessageId Maybe
|
||||
root DiscussionId
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue