add emojid
This commit is contained in:
parent
ccba00b2e7
commit
4dd63360a2
7 changed files with 5082 additions and 9 deletions
|
|
@ -26,6 +26,7 @@ type thread_data =
|
|||
|
||||
type post =
|
||||
{ id : string
|
||||
; emojid : string
|
||||
; parent_id : string
|
||||
; date : float
|
||||
; user_id : string
|
||||
|
|
@ -294,8 +295,10 @@ let build_reply ~comment ~image_info ~tag_list ?parent_id user_id =
|
|||
let date = Unix.time () in
|
||||
let comment, citations = parse_comment comment in
|
||||
let* nick = User.get_nick user_id in
|
||||
let* emojid = Emojid.make_emojid id in
|
||||
let reply =
|
||||
{ id
|
||||
; emojid
|
||||
; parent_id
|
||||
; date
|
||||
; user_id
|
||||
|
|
@ -353,6 +356,7 @@ let make_post ~comment ?image_input ~tags ~op_or_reply_data user_id =
|
|||
let post_exist id = Result.is_ok (Q.get_is_post id)
|
||||
|
||||
let get_post id =
|
||||
let* emojid = Emojid.Q.get_emojid id in
|
||||
let* parent_id = Q.get_post_thread id in
|
||||
let* user_id = Q.get_post_user_id id in
|
||||
let* nick = User.get_nick user_id in
|
||||
|
|
@ -365,6 +369,7 @@ let get_post id =
|
|||
let* citations = Q.get_post_citations id in
|
||||
let reply =
|
||||
{ id
|
||||
; emojid
|
||||
; parent_id
|
||||
; date
|
||||
; user_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue