core icon indicating copy to clipboard operation
core copied to clipboard

feat: add message parser api to jsonrpc and cffi

Open Simon-Laux opened this issue 2 years ago • 6 comments

api: cffi add dc_parse_message_text_to_ast_json and dc_msg_get_parsed_text_as_json

api: jsonrpc: add get_parsed_message_text_ast_json and parse_text_to_ast_json

Simon-Laux avatar Sep 04 '23 19:09 Simon-Laux

cargo-deny CI complains about duplicate dependencies, they could be added to exceptions or actually fixed (https://github.com/deltachat/message-parser/issues/41)

link2xt avatar Sep 05 '23 18:09 link2xt

Also you probably want to rebase it on stable and change PR base to stable.

link2xt avatar Sep 05 '23 18:09 link2xt

I rebased this onto stable. Would be nice to have a new release of message parser with nom 7 now. Opened an issue: https://github.com/deltachat/message-parser/issues/48

link2xt avatar Sep 30 '23 21:09 link2xt

hum, this got a bit stale -- also i am wondering if message-parsing is not better intetgrated into other message-gettters instead of requiring a separate call to the parser. (maybe based on a flag when querying). Saves a round-trip.
Also, as far as i understood the PR here is not going to be used by Desktop which needs sync-calls to message-parser-compiled-to-wasm (IIRC) so i suggest to close it and mark it with resurrection, and then find some timing for an agreed approach (between UI and core devs) and then tackle/finish it.

hpk42 avatar Nov 12 '23 19:11 hpk42

The idea was to get it into core so our UIs and also delta touch can benefit from it without introducing another library. Though Lothar said https://github.com/deltachat/message-parser/issues/43 would be useful to have so he does not need to implement all elements at once.

Simon-Laux avatar Nov 12 '23 20:11 Simon-Laux

yes, the plan is to integrate message-parser into core, i didn't mean to question that. Rather i suggested it might make sense to enhance MessageObject to already return the parsed tree (if there is anything worth rendering in it, so a pure text with no markup/links/addresses etc. could probably just leave this empty). There would be no new API call then. Note that i don't mean to imply any urgency about this -- was just gardening core PRs randomly and this one stuck out as lingering.

hpk42 avatar Nov 13 '23 09:11 hpk42