@@ -31,7 +31,7 @@ function prepareDatabase()
31
31
// should we care about which server it came from as well, for the sake of generality?
32
32
// even if it's only intended to be used on one server?
33
33
assertTable ( "Message" , [ "msgId" , "channel" , "author" ] ) ;
34
- assertTable ( "Content" , [ "fullMessage" , "codeSnippet" , " date" , "language ", "associatedMsg" ] ) ;
34
+ assertTable ( "Content" , [ "fullMessage" , "date" , "associatedMsg" ] ) ;
35
35
} ;
36
36
37
37
// close the database if its open
@@ -80,20 +80,8 @@ function createEntry(message)
80
80
// add a revision to a message in the database
81
81
function storeRevision ( message )
82
82
{
83
- // i'm not sure how we should handle multiple code snippets per message yet
84
- // so for now i'll just add separate row per snippet
85
- // (they are associated by timestamp)
86
- // also i'm assuming "date" column should be a universal time stamp
87
- // (but we can change it to a formatted date if that was the intention)
88
- getCodeBlocks ( message . content ) . forEach ( block =>
89
- insertRow ( "Content" , [ message . content , block . code ,
90
- getLatestTimestamp ( message ) , block . lang , message . id ] ) ) ;
91
-
92
- // i'm not sure what to do with urls at the moment,
93
- // so i'll just stuff them in the same row for now
94
- getLinks ( message . content ) . forEach ( link =>
95
- insertRow ( "Content" , [ message . content , link ,
96
- getLatestTimestamp ( message ) , null , message . id ] ) ) ;
83
+ // store this revision of the message
84
+ insertRow ( "Content" , [ message . content , getLatestTimestamp ( message ) , message . id ] ) ;
97
85
}
98
86
99
87
// tab over newlines
0 commit comments