MCPcopy Create free account
hub / github.com/AppFlowy-IO/AppFlowy-Collab / new_reply

Method new_reply

collab/src/database/rows/comment.rs:131–146  ·  view source on GitHub ↗

Creates a new reply comment

(content: String, author_id: String, parent_comment_id: String)

Source from the content-addressed store, hash-verified

129
130 /// Creates a new reply comment
131 pub fn new_reply(content: String, author_id: String, parent_comment_id: String) -> Self {
132 let now = timestamp();
133 Self {
134 id: Uuid::new_v4().to_string(),
135 parent_comment_id: Some(parent_comment_id),
136 content,
137 author_id,
138 created_at: now,
139 updated_at: now,
140 is_resolved: false,
141 resolved_by: None,
142 resolved_at: None,
143 reactions: HashMap::new(),
144 attachments: Vec::new(),
145 }
146 }
147
148 /// Creates a RowComment from a MapRef
149 pub fn from_map_ref<T: ReadTxn>(map_ref: &MapRef, txn: &T) -> Option<Self> {

Callers

nothing calls this directly

Calls 1

timestampFunction · 0.50

Tested by

no test coverage detected