-
Notifications
You must be signed in to change notification settings - Fork 3
Create .NET bot #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Create .NET bot #79
Conversation
|
This already configures an account and starts I/O. Have not figured out how to parse events with are distinguished by "kind". Related issue about matching F# types to union types: dotnet/runtime#55744 |
|
Deserialization now works for info messages, but for So it is unhappy about "kind" being not the first type because there is a "comment" before that. One way is to switch from StreamJsonRpc.SystemTextJsonFormatter to StreamJsonRpc.JsonMessageFormatter which uses Newtonsoft JSON library instead of standard one. But then polymorphic attributes from the standard library will not work, need to redo the class hieararchy for events. Maybe there is a solution for standard library or we can change the core to always put "kind" first. EDIT: fixed with |
|
There is now a C# bot at https://github.com/timothyparez/deltachat-dotnet-bot/ |
.NET has built-in support for JSON-RPC: https://github.com/microsoft/vs-streamjsonrpc/
So it should fit well for bot creation.
I don't have any experience with .NET packaging, but it may be worth building some basic example in case someone familiar with C# or F# wants to write a bot and take over maintenance of "bindings".