Commit Graph

49 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
Filip Borkiewicz 72e7d68176 Update muxrpc/handlers/tunnel/server/members.go
Co-authored-by: decentral1se <1991377+decentral1se@users.noreply.github.com>
2022-11-01 13:30:00 +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 4d3b880acc set muxrpc header flag correctly 2021-05-24 16:22:47 +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 634f464d64 add missing copyright header 2021-05-17 16:13:00 +02:00
Henry e7c20bcd5d add room.attendants implementation
updates #89
2021-05-17 16:06:09 +02:00
Henry ec4edcccbc rename broadcast types 2021-05-17 15:40:33 +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 cf3cf1791e reduce tunnel debug logging 2021-05-10 13:53:04 +02:00
Henry 2ecf61f123 don't allow making tunnels to initiator 2021-05-10 13:52:45 +02:00
Henry 7c75b27c8d
have a clear error on taken aliases
fixes #194
2021-05-10 13:51:05 +02:00
Henry bdf99ab4fa add staleness and tunnel.connect tests 2021-04-26 09:39:11 +02:00
Henry 984f3dfc87 remove peers from the room when the muxrpc sessions ends
fixes #173
2021-04-21 11:56:33 +02:00
Henry f68bd7d46f don't leak internal details to callers
fixes #154
2021-04-21 11:51:00 +02:00
Henry 13d9ba41c4 update some comments 2021-04-21 09:44:44 +02:00
Henry a965333f90 add assertions to the new test 2021-04-20 18:17:56 +02:00
Henry 9cd7aa0b5a introduce tunnel.endpoint tests 2021-04-20 18:17:56 +02:00
Henry 1a6d027292 Apply suggestions from code review
Co-authored-by: Alexander Cobleigh <cblgh@cblgh.org>
Co-authored-by: André Staltz <andre@staltz.com>
2021-04-20 18:10:28 +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 3afe9b3659 fix origin information of tunnel.connect
also cleanup logging by removing output to stdout
2021-04-20 18:09:40 +02:00
Henry 545187dfe5 dont remove peers on a whim
it could be they error on the call for a valid reason.

TODO:
* we need to make an IsConnectionError(err)
* maybe level up the gossip.ping code for liveliness.
2021-04-20 17:18:30 +02:00
Henry b939ca0873 tweak gossip.ping code 2021-04-20 17:18:27 +02:00
Henry 52ec94e878 fix link generation for alias registration
fixes #160
2021-04-19 15:00:35 +02:00
cblgh faae7c0324 get started with privacy modes, parse -mode flag 2021-04-06 16:52:51 +02:00
Henry 1170275816 rename ClientRequest to ClientPayload 2021-03-26 17:58:03 +01:00
Henry 3b092885fb cleanup 2021-03-26 13:45:21 +01:00
Henry 4325e0fb3d various fixes
* fill in sid and sc
* fix logout
* cascade member removal
* fix links
* trim suffix from signature
* fix /sse/login link
* fix sse links and filenames
* fix logout
* fix typos
* fix test compilation
* fix bridge test
* correct alias url test
* add some comments
* fix potentiall "can't send" deadlock on bridge

some documentation and license headers
2021-03-26 13:45:17 +01: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 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 abaff98f77 move aliases signing to internal 2021-03-23 17:13:06 +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 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 9d60d09843 add aliases.IsValid for name checks 2021-03-16 08:49:47 +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 38da82980e fix builds 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