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
Request signaling server trial #3620
Request signaling server trial #3620
Conversation
5afc5ef
to
15b6c8c
Compare
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.
Added some feedback and please change the wording from "trail" to "trial".
7667c16
to
2ea76a4
Compare
2ea76a4
to
ddae0df
Compare
Any idea how to make the whole parsing mess in https://github.com/nextcloud/spreed/pull/3620/files#diff-a862c0a156d4c35c3617618db80227a4R85-R257 a lot more structured? Maybe @rullzer, @kesselb or @ChristophWurst? I feel really bad about this mess of code, but it's just quite some cases you want to have covered and all have different error handling 🙈 some throw exceptions, some return empty values, some require to call separate functions to fetch the error (looking at you And then you want to have a bunch of logging and a bunch of user facing error messages And then there is basically the same again. I would like to extract those two big blocks (above and below |
1396135
to
8d9214a
Compare
I moved them to a service class that translates all cases in one of two exceptions (one for API, connection or response errors the user can't solve and one for user problems like wrong input or non-public server). Now the controller is far better readable and only does the actual logic it needs to do. spreed/lib/Controller/HostedSignalingServerController.php Lines 87 to 106 in 8d9214a
|
6aa80ca
to
8b0bf1b
Compare
Most is done. Only one disclaimer sentence needs to be added that signaling server is overwritten. And we need to check how to drop accounts from Nextcloud again (I would do that if the Struktur API returns that the account was deleted). |
Problem with this would be that then if the API is not reachable, but the webserver or proxy returns a 404 the account would also vanish. Maybe we should still add the option to delete the account? And only then remove it from the settings page? |
How to run this locally:
Testing:
|
|| !isset($data['owner']['email']) | ||
|| !isset($data['owner']['language']) | ||
|| !isset($data['owner']['country']) | ||
/* TODO they are not yet returned |
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.
@fancycode While doing a full test run I noticed that those fields are not yet returned.
@nickvergessen Either leave it as it is now (the limits are only shown in the UI if present anyways) or coordinate with @fancycode if they are added.
// and thus the cached value in the config object would trigger an UPDATE | ||
// instead of an INSERT if there is another request to the API server | ||
$this->config->deleteAppValue('spreed', 'hosted-signaling-server-nonce'); | ||
} catch (ClientException $e) { |
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 error case handling is very similar for all three requests. This maybe refactored a bit, but I don't want to mix them too much as some status codes are different for the three requests. So it's up to you to move it all in one method or leave it that verbose.
tr :first-child { | ||
opacity: .5; | ||
} | ||
.delete { |
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.
There is some custom styling for the delete button (I used the one from the "enable unsupported app" in the app management).
</p> | ||
<button class="button delete" | ||
:disabled="loading" | ||
@click="deleteAccount"> |
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.
Maybe we want a modal here to ask if the account really should be deleted. Up to you. Also after deletion a re-registration is not possible.
49dd7ef
to
f549b56
Compare
}, | ||
|
||
beforeMount() { | ||
const state = loadState('talk', 'hosted_signaling_server_prefill') |
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 think you can just do this in data()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
… server trial - without notifciations Signed-off-by: Morris Jobke <hey@morrisjobke.de>
…count Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
675dfd7
to
09811cd
Compare
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.
Works
Thanks @nickvergessen 🚀 |
This is a little form inside the talk settings to request a trial from the newly announced hosted signaling server by Struktur AG (see https://nextcloud.com/blog/open-sourcing-talk-back-end-rc-of-talk-9-brings-lots-of-improvements/).
As of now it looks like this:
Things that need to be done:
dropping the status if the account was deleted on the server side (server here means Struktur's server)replaced by an "delete account button"Pending things to decide: