Commit Graph

52 Commits

Author SHA1 Message Date
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
boreq ea9b22cfa7 Add an RPC endpoint listing all members
Currently an RPC endpoint which lists only the connected members is
available. A list of all members, even those who are offline, is
available only using the web dashboard. This pull request adds an RPC
endpoint which lists all members of the room.

This new endpoint can be used to augment SSB clients with extra
information about the rooms. For example friends who are room members
can be displayed in room-related settings or information about shared
rooms can be displayed in user profiles.

The new endpoint is a source endpoint called ["room", "members"]. Source
endpoint was selected to make it possible to return multiple smaller
responses instead of one large response - an async endpoint could
struggle to return the list of all members in case of larger rooms. Each
response carries a list of member objects. Currently the implementation
naively returns one member per response message but that can be adjusted
in the future.

Currently the request takes no arguments but extra options could be
added in the future.

Currently member objects only have one property: their id. This can be
extended in the future.
2022-11-01 13:30:00 +02:00
Filip Borkiewicz 92681a9c49
Add a listAliases muxrpc endpoint (#320)
* Add a listAliases muxrpc endpoint

* Remove unwanted error handling
2022-08-19 22:47:33 +03:00
Henry a249fd8bee fix SPDX headers and add reuse API badge 2021-10-08 14:39:31 +02:00
Henry 4d3610e2fb prepare v2 release 2021-05-31 14:51:05 +02:00
Henry 3e53570638 dependency updates
* use LICENSEd version of nocomment
* use forked kitlog
* cleanup of various dependencies
2021-05-25 12:40:00 +02:00
Henry 85ee99a1b2
remove room.announce and room.leave from muxrpc (#223)
* remove room.announce and room.leave from muxrpc

those were confusion and implied some use beyond just opening
tunnel.endpoints/room.attendants (which implicitly does what
tunnel.announce does).

updates #89
2021-05-21 15:52:04 +02:00
Henry 3fae8a200a change handler registration 2021-05-17 15:31:29 +02:00
Henry 27fc5713cc change isRoom to have metadata
fixes #58
2021-05-17 12:24:29 +02:00
Henry 385b98a3a1 add privacy mode and role tests (fixes #185)
* denied/remove
* denied/add
* invites/revoke
* members/remove
* notices/edit
* notices/add

also:
* add members.CheckAction helper
* fix muxrpc abort bug and update to v2.0.5
* strictly use SeeOther not 307 (fixes #149)
2021-05-14 14:27:01 +02:00
cblgh 72e97dd374 refactor out unused reference 2021-04-26 09:29:22 +02:00
Henry e6ca0ed74b remove unused argument 2021-04-23 08:56:01 +02:00
Henry 940cd2b3d1 Fix ssb-ws connections
The landing path (/) can now also be used as a websocket endpoint.
This enables use of the room server with ssb-browser-demo and similar
applications that can't use TCP connections.

also pin WIP muxrpc branch (fix-stupid-timeout)
2021-04-20 18:10:26 +02:00
Henry 52ec94e878 fix link generation for alias registration
fixes #160
2021-04-19 15:00:35 +02:00
cblgh 50ddcd6423 use s.rootCtx 2021-04-13 09:04:40 +02:00
cblgh 83500421f8 deny connections for banned keys 2021-04-07 12:58:03 +02:00
cblgh 09eff17712 implement review suggestions 2021-04-06 16:52:54 +02:00
cblgh faae7c0324 get started with privacy modes, parse -mode flag 2021-04-06 16:52:51 +02:00
Henry 36679e5c65 add muxrpc gossip.ping 2021-03-26 13:45:17 +01:00
Henry 396961e5e8 implement bridge between muxrcp and http 2021-03-26 13:36:48 +01:00
Henry afa6bee285 add server-sent events handler 2021-03-26 13:36:48 +01:00
Henry a180c74c38 begin sign-in with ssb
* sketch session store
* use session store and unify authentication handling
* sketch muxrpc handlers
2021-03-26 13:36:42 +01:00
Henry 0065312db1 change muxrpc room.registerAlias to return the resolve URL 2021-03-23 16:50:25 +01:00
Henry 8f4c60e710 muxrpc changes 2021-03-22 13:02:39 +01:00
Henry d39d1ac6e9 go fmt ./... the last PR 2021-03-16 15:13:05 +01:00
Henry c41abf5a72 add revokeAlias to muxrpc handler 2021-03-16 09:13:27 +01:00
Henry 5092f8ef9e add more godoc strings 2021-03-16 09:10:44 +01:00
Henry 757b14d419 Apply suggestions from code review
Co-authored-by: Alexander Cobleigh <cblgh@cblgh.org>
2021-03-16 08:49:58 +01:00
Henry 6fe202cead license headers 2021-03-16 08:49:47 +01:00
Henry 71c013ee81 some polish 2021-03-16 08:49:47 +01:00
Henry 8335a74c0e add test for alias registration over muxrpc 2021-03-16 08:49:40 +01:00
Henry 033efe5145 muxrcp: alias.register
* re-work muxrpc handler registration
* update muxrpc tests
2021-03-16 08:49:18 +01:00
Henry 23c7e02c45 rename muxrpc packages 2021-03-10 16:57:49 +01:00
Henry 117cad48a7 rename admindb to roomdb 2021-03-10 16:44:46 +01:00
Henry 6132b37f39 disambiguate "handlers" package
This was fine when there was just one for muxrpc but "handlers"
and "web/handlers" feels like asking for confusion.
2021-03-02 14:17:42 +01:00
Henry 9dcab464cb small cleanup 2021-02-15 15:08:34 +01:00
Henry 58f795d5e6 route with query params instead of named routers
Since we don't use the web/router through and through to setup handler
functions, accessing the named route varaibles doesn't work inside those
handler functions.

Since I dont find it acceptable to juggle two concepts here I switch the
url generation to classical get query paramters (route?varA=xyz&varB=2).
2021-02-15 14:43:55 +01:00
Henry 6416d1c215 allow list interface 2021-02-15 14:43:32 +01:00
Henry 7fa52a6e2d various fixes
* fix nav link
* fix roomstate lock and ticker
* fix copy pasta typos

web/handlers: stop using /testing/base in news

This was a brainfart. The idea for a more minimal base template came
from another project with different frontend code.

This stopped us from seeing tempalting errors in the nav area.

Might want to scratch these tests alltogether and just have one place
with all the http tests.
2021-02-11 15:31:45 +01:00
Henry beea19f93e seperate room state from muxrpc handler
There is a new roomstate package now with a Manager which is shared between muxrpc and the http
handler(s).

Also adds a list of peers in the room to admin dashboard.
2021-02-11 15:30:51 +01:00
Henry fec92d428c change name to go-ssb-room
It has been brought to my attention that "gossb" reads like "gossip..?"
to the untrained eye. That's just confusing.

Also the project hosts a single room so the plural was just wrong.
2021-02-09 17:38:51 +01:00
Henry 0a44d19b4b add missing license headers 2021-02-09 12:53:33 +01:00
Henry e9013a0c6b change import path
this is part of the NGI work and should be clearly indicated as such
2021-02-04 16:54:30 +01:00
Henry f31de7faa1 use newer muxrpc with Handled() 2021-02-02 17:45:17 +01:00
Henry f0e6c67fe1 skip comments in authroized_keys 2021-01-29 12:06:19 +01:00
Henry 668e3dd766 simple authorized_keys file 2021-01-28 15:06:51 +01:00
Henry 84c36d1f71 add tunnel.connect 2021-01-28 10:55:05 +01:00
Henry b50f052e66 update muxrpc v2 branch 2021-01-27 11:38:45 +01:00
Henry 29688bc328 begin nodejs testing 2021-01-26 18:33:29 +01:00
Henry f8ed24b665 start tunnel muxrpc handler 2021-01-25 18:31:09 +01:00