diff options
author | default <nobody@localhost> | 2022-09-27 14:07:36 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-09-27 14:07:36 +0200 |
commit | 0b6540f503006aa3b4d004afbd9bbeeb35200b8a (patch) | |
tree | 37d6b7298d28274362d76a3db8ca5a145b839a43 /main.c | |
parent | f516866f9ebcb24cc4b8db7573c59ff3a8bf3cfb (diff) |
Notes can be posted WOW!.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -165,9 +165,9 @@ int main(int argc, char *argv[]) if (strcmp(cmd, "note") == 0) { int status; - xs *data = NULL; xs *content = NULL; - xs *f_content = NULL; + xs *msg = NULL; + xs *c_msg = NULL; if (strcmp(url, "-") == 0) { /* get the content from an editor */ @@ -189,9 +189,16 @@ int main(int argc, char *argv[]) else content = xs_dup(url); - not_really_markdown(content, &f_content); + msg = msg_note(&snac, content, NULL, NULL); + + c_msg = msg_create(&snac, msg); + + { + xs *j = xs_json_dumps_pp(c_msg, 4); + printf("%s\n", j); + } - printf("%s\n", f_content); + post(&snac, c_msg); return 0; } |