-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat: add config option to enable iroh #5607
Conversation
Besides unrelated changes (iroh_secret_key, deleted in one place but not the other), |
deltachat-ffi/deltachat.h
Outdated
@@ -523,6 +523,7 @@ char* dc_get_blobdir (const dc_context_t* context); | |||
* e.g. `ui.desktop.foo`, `ui.desktop.linux.bar`, `ui.android.foo`, `ui.dc40.bar`, `ui.bot.simplebot.baz`. | |||
* These keys go to backups and allow easy per-account settings when using @ref dc_accounts_t, | |||
* however, are not handled by the core otherwise. | |||
*- `enable_realtime` = Whether the realtime APIs should be enabled. If not enabled, they will behave as noops. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't that problematic for the webxdcs, if they can't know if the apis are even usable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be read from the config (by the frontend implementation) which should then transport this information to the webxdc.
I wanted to return an error before but we decided against it. Maybe we should reconsider because this error can also be given to the xdc directly
c347ea8
to
436ff73
Compare
Rebased because I rebased debug-iroh-2 as well. |
On Mon, May 20, 2024 at 09:06 -0700, Friedel Ziegelmayer wrote:
@dignifiedquire commented on this pull request.
> @@ -523,6 +523,7 @@ char* dc_get_blobdir (const dc_context_t* context);
+ *- `enable_realtime` = Whether the realtime APIs should be enabled. If not enabled, they will behave as noops.
isn't that problematic for the webxdcs, if they can't know if the apis are even usable?
webxdc realtime support is experimental and not available on Android or iOS yet
so we want to keep the core API surface very minimal and only do things that are strictly needed.
If UIs want to provide feedback to webxdc apps by e.g. not exposing realtime APIs to apps if the config is off, or by a popup/warning about unavailable realtime API, they can do so.
Note that even if APIs are available to xdc apps you might be in a chat with others who don't support it, so any app must anyway deal with "realtime not working" even if the config is enabled and the API is available.
|
9e14e69
to
37c771d
Compare
CI is still failing (python tests) |
# share a webxdc app between ac1 and ac2 | ||
ac1_webxdc_msg = acfactory.send_message(from_account=ac1, to_account=ac2, text="play", file=path_to_webxdc) | ||
ac2_webxdc_msg = ac2.get_message_by_id(ac2.wait_for_incoming_msg_event().msg_id) | ||
ac1_webxdc_msg, ac2_webxdc_msg = setup_realtime_webxdc(ac1, ac2, path_to_webxdc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole point of the test is that it sends realtime advertisements sequentially, now they are sent twice and in parallel at first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also does not even pass the lint anymore because ac1
and ac2
are never created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't run the python test currently, so changing the tests is rather a hit or miss. Can you fix this quickly? I gues it's only a few line changes
Co-authored-by: link2xt <[email protected]>
Thanks :) |
close #5590