Implement #22 and #9 #44

Closed
lda wants to merge 25 commits from lda/telodendria:implement-22-9 into master
Contributor

Implements the following in #22:

  • RouteRoomAliases
    • Get from "id" in aliases
    • Note to check permissions according to spec
      • It's still not enough(it only really checks if whenever the user has the ALIAS privilege), but I feel like this should just be left as a TODO until proper room support.
  • RouteAliasDirectory
    • Add "id" objects when putting aliases
    • Delete from "id" when deleting aliases

Implements #9 for the user parsing


Please review the developer certificate of origin:

  1. The contribution was created in whole or in part by me, and I have
    the right to submit it under the open source licenses of the
    Telodendria project; or
  2. The contribution is based upon a previous work that, to the best of
    my knowledge, is covered under an appropriate open source license and
    I have the right under that license to submit that work with
    modifications, whether created in whole or in part by me, under the
    Telodendria project license; or
  3. The contribution was provided directly to me by some other person
    who certified (1), (2), or (3), and I have not modified it.
  4. I understand and agree that this project and the contribution are
    made public and that a record of the contribution—including all
    personal information I submit with it—is maintained indefinitely
    and may be redistributed consistent with this project or the open
    source licenses involved.
  • I have read the Telodendria Project development certificate of
    origin, and I certify that I have permission to submit this patch
    under the conditions specified in it.
Implements the following in #22: - `RouteRoomAliases` - [x] Get from "id" in aliases - [x] Note to check permissions according to spec - It's *still* not enough(it only really checks if whenever the user has the `ALIAS` privilege), but I feel like this should just be left as a TODO until proper room support. - `RouteAliasDirectory` - [x] Add "id" objects when putting aliases - [x] Delete from "id" when deleting aliases Implements #9 for the user parsing --- Please review the developer certificate of origin: 1. The contribution was created in whole or in part by me, and I have the right to submit it under the open source licenses of the Telodendria project; or 1. The contribution is based upon a previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the Telodendria project license; or 1. The contribution was provided directly to me by some other person who certified (1), (2), or (3), and I have not modified it. 1. I understand and agree that this project and the contribution are made public and that a record of the contribution—including all personal information I submit with it—is maintained indefinitely and may be redistributed consistent with this project or the open source licenses involved. - [x] I have read the Telodendria Project development certificate of origin, and I certify that I have permission to submit this patch under the conditions specified in it.
jordan reviewed 2023-11-30 12:57:35 +00:00
@ -32,3 +36,3 @@
{
RouteArgs *args = argp;
char *alias = ArrayGet(path, 0);
char *alias = HttpUrlDecode(ArrayGet(path, 0));
Owner

I am fairly certain that parameters should already be decoded by the time they are added to the path array. If they aren't, then Cytoplasm needs to do this, not each of the individual routes.

I am fairly certain that parameters should already be decoded by the time they are added to the `path` array. If they aren't, then Cytoplasm needs to do this, not each of the individual routes.
Author
Contributor

Yeah, Cytoplasm doesn't seem to decode those by default it seems...

Yeah, Cytoplasm doesn't seem to decode those by default it seems...
Author
Contributor

Just filed a short PR to fix that in Cytoplasm(#19).

Just filed a short PR to fix that in Cytoplasm(#19).
lda marked this conversation as resolved
jordan reviewed 2023-11-30 12:59:17 +00:00
@ -30,3 +35,3 @@
{
RouteArgs *args = argp;
char *roomId = ArrayGet(path, 0);
char *roomId = HttpUrlDecode(ArrayGet(path, 0));
Owner

Same as above. Cytoplasm should be doing this. If it isn't, then we should open an issue there.

Same as above. Cytoplasm *should* be doing this. If it isn't, then we should open an issue there.
lda marked this conversation as resolved
jordan reviewed 2023-11-30 13:00:29 +00:00
@ -37,6 +37,7 @@ ROUTE_IMPL(RouteVersions, path, argp)
#define DECLARE_SPEC_VERSION(x) ArrayAdd(versions, JsonValueString(x))
DECLARE_SPEC_VERSION("v1.5");
Owner

Yeah. I figured this would probably be necessary at some point. Clients don't like to see only v1.7, they like to see all of the preceding versions as well. Maybe we should add v1.2 through v1.6 as well, just for completeness?

Yeah. I figured this would probably be necessary at some point. Clients don't like to see only `v1.7`, they like to see all of the preceding versions as well. Maybe we should add `v1.2` through `v1.6` as well, just for completeness?
Author
Contributor

Yeah, just pushed some changes to declare v1.2-v1.7.

Yeah, just pushed some changes to declare `v1.2`-`v1.7`.
lda marked this conversation as resolved
lda changed title from WIP: Implement #22 and #9 to Implement #22 and #9 2023-12-08 20:47:59 +00:00
lda changed title from Implement #22 and #9 to WIP: Implement #22 and #9 2023-12-09 20:16:08 +00:00
Owner

With the exception of the conflicts, is this pull request ready to be merged?

With the exception of the conflicts, is this pull request ready to be merged?
lda changed title from WIP: Implement #22 and #9 to Implement #22 and #9 2024-01-05 16:24:30 +00:00
Owner

It looks like the recent changes to the configuration API are causing problems here. Please merge master again and resolve the conflicts.

It looks like the recent changes to the configuration API are causing problems here. Please merge `master` again and resolve the conflicts.
lda force-pushed implement-22-9 from 3d35ed85c3 to 85bef9e949 2024-01-06 15:08:06 +00:00 Compare
lda force-pushed implement-22-9 from 85bef9e949 to 5851298957 2024-01-06 15:14:43 +00:00 Compare
Owner

This looks mostly good, I will pull it down shortly and play with it on my machine before merging.

This looks mostly good, I will pull it down shortly and play with it on my machine before merging.
Owner

Good work. Merged as #45.

Good work. Merged as #45.
jordan closed this pull request 2024-01-12 00:34:15 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Telodendria/Telodendria#44
No description provided.