Commit Graph

28 Commits

Author SHA1 Message Date
boreq ab664aafc3 Add a JSON endpoint for generating invites
When running in open mode invites can be freely generated by accessing
/create-invite. This displays an HTML page which creates and displays an
invite to the user.

This commit adds an additional way of creating invites in open mode. A
POST request can be sent to the same /create-invite endpoint with the
Accept header set to application/json. This returns a JSON response
which contains an invite url.

The purpose of this change is to make automatic invite generation easier
in SSB clients.
2022-12-13 19:15:11 +01:00
decentral1se 00a1452cfc
Migrate to ssbc urls (#336)
* fix: ssbc urls

Closes https://github.com/ssbc/go-ssb-room/issues/332

* fix: go-ssb-refs API changes

* test: go-ssb-refs API changes

Co-authored-by: decentral1se <cellarspoon@riseup.net>
Co-authored-by: André Staltz <andre@staltz.com>
2022-11-07 11:18:13 +02:00
Andre Staltz 2d722f2098 unbreak TestInviteShowAcceptForm 2021-11-23 09:20:08 -03:00
Andre Staltz 8c9413d55d android intent uri does not require package field 2021-11-23 09:20:08 -03:00
Andre Staltz 642022cb0a fix support for SSB URIs on Android Chrome 2021-11-23 09:20:08 -03:00
Henry a249fd8bee fix SPDX headers and add reuse API badge 2021-10-08 14:39:31 +02:00
Henry 580830be76 went a bit too far with search+replace 2021-05-31 14:53:53 +02:00
Henry 4d3610e2fb prepare v2 release 2021-05-31 14:51:05 +02:00
User Cryptix fc5d3e440e add json response for invite facade (fixes #188) 2021-04-23 08:55:50 +02:00
Andre Staltz 3beb656b9c change join-room to claim-http-invite 2021-04-23 08:54:29 +02:00
cblgh c6077337d1 use more robust identifier for test 2021-04-20 10:36:40 +02:00
cblgh 1c5c0b9867 make tests more robust when validating specific csrf token 2021-04-20 09:22:53 +02:00
Henry 3323a85226 refactor urlTo to use domain information for all links 2021-04-19 15:00:29 +02:00
Andre Staltz 0f119565e9
update tests 2021-04-16 18:38:13 +03:00
Henry 8ff4adf160 various fixes
* fix test compilation
* fix aliases on member page
* add tests for aliases on member.GetByID and ByFeed
* fix admin tests
* use webassert helper for flash messages
* fix flashes
2021-04-12 14:10:42 +02:00
Henry cec7bc0e44 add flash message helper 2021-04-12 14:09:09 +02:00
cblgh d11839c3ce fix call count 2021-04-07 13:03:14 +02:00
cblgh 7ea79b3e33 test invite consumption being denied 2021-04-07 13:01:28 +02:00
Andre Staltz 2aa82bcfbf
update tests for invite web handlers 2021-04-06 12:32:29 +03:00
Henry 377f3512a2 remove member nickname and alias suggestion
insert-user: remove nickname
2021-03-29 15:53:33 +02:00
Henry d1d108b9b7 Add support for invite consumption via JSON 2021-03-29 15:53:30 +02:00
cblgh a8061c0f20 rename webassert.InputsInForm->ElementsInForm
* webasserts.InputsInForm now also takes a Tag as arg
2021-03-16 14:08:30 +01:00
Henry b9bcbb42ec alias JSON endpoint and testing 2021-03-16 08:49:58 +01:00
Henry 96b57b7562 split up http_test and move assertion helpers into a new package 2021-03-11 09:55:38 +01:00
Henry 117cad48a7 rename admindb to roomdb 2021-03-10 16:44:46 +01:00
Henry b95c8de8be add room v1 "invite" until we have ssb-uri finalized 2021-03-10 09:35:54 +01:00
Henry b21e2b2062 More testing
* test for invite accept form rendering
* show placeholder if there is no suggested alias
* accept form and consume endpoint
2021-03-10 09:35:30 +01:00
Henry 98468e93a5 Invite endpoints
* Add revoke and created templates
* Render invite accept with domain
* Flesh out accept page
2021-03-10 09:33:55 +01:00