6
1
mirror of https://git.mills.io/saltyim/saltyim.git synced 2024-06-16 03:48:24 +00:00
Commit Graph

130 Commits

Author SHA1 Message Date
James Mills
85ed56db8d
Fixed a spot I missed with a remaining go-app import 2023-07-16 10:42:38 +10:00
James Mills
376de27023 Split out the PWA into its own repository (#194)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/194
2023-04-23 09:31:43 +00:00
James Mills
d5c9b6d825
Fix client.Read() context usage 2023-03-12 15:17:57 +10:00
James Mills
ae26edfa42
Rename package to go.salty.im/saltyim 2023-02-28 08:37:50 +10:00
lyse
c67f5c69b2 Fix typos (#186)
Disclaimer: I have no idea what I'm looking at.

Some tests fail, but I believe they have nothing to do with my changes
(fingers crossed). `make certs` doesn't work, I don't have `minica`
installed and don't want to litter my system with even more stuff. It's
bad enough that I got a shitload of Go dependencies downloaded when
running `make test`.

Co-authored-by: Lysander Trischler <twtxt@lyse.isobeef.org>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/186
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: lyse <lyse@noreply@mills.io>
Co-committed-by: lyse <lyse@noreply@mills.io>
2023-01-27 23:24:19 +00:00
James Mills
ba77f9e32c Refactor read options with functional options for easier usage (#183)
Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/183
2023-01-27 23:19:52 +00:00
James Mills
57970ff67f Add resolver tests (#182)
Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/182
2023-01-27 23:14:03 +00:00
James Mills
36f9b25ec9 Add format tests (#181)
Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/181
2023-01-27 23:13:51 +00:00
James Mills
14857206cb Add client e2e integration tests (#180)
Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/180
2023-01-26 22:30:16 +00:00
James Mills
8cdda7118d Fix tests (#179)
Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/179
2023-01-26 04:27:20 +00:00
James Mills
ddd16c202f Add blob service and support for signing and verifying HTTP requests (#178)
Alternative to #177

The way this works is:

Client:

- Client creates a normal `net/http.Request{}` object using the `Request()` function in `utils.go`. The `http.Request{}` object is then signed using the Client's Ed25519 private key.
- The HTTP Method and Path (_note this is important_) are hashed, as well as the request body (if any) using the FNV128a hashing algorithm.
- This hash is then signed by the Client's's Ed25519 private key.
- The resulting signature is then encoded to Base64 (_standard encoding_) and added to the HTTP headers as a `Signature:` header.
- In addition the Client's Ed25519 public key is added to the HTTP headers as `Signer:`

Server:

- The server calculates the same FNV128a hash of the HTTP Request Method and Path and the body (if any)
- The server decodes the HTTP header `Signature:`
- The server then uses the Client's Ed25519 public key in the HTTP header `Signer:` to verify the signature of the `Signature:` HTTP header which gives us back the original FNV128a hash the Client calculated for the request.
- The server then compares the Client's hash with the expected hash to see if they compare equally.

Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Co-authored-by: Jon Lundy <jon@xuu.cc>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/178
Reviewed-by: xuu <xuu@noreply@mills.io>
2023-01-25 23:05:29 +00:00
James Mills
ae2199bff4
Fix version handling 2023-01-14 12:05:29 +10:00
James Mills
95663345d4 Adds support for multiple chats (#174)
Closes #146

See attached screenshots.

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Co-authored-by: James Mills <1290234+prologic@users.noreply.github.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/174
Reviewed-by: xuu <xuu@noreply@mills.io>
2023-01-11 22:58:07 +00:00
James Mills
801493a85b
Update logo 2022-10-24 14:40:30 +10:00
xuu
318c3275b5 fix: Make register lookup broker if default to blank (#175)
Co-authored-by: Jon Lundy <jon@xuu.cc>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/175
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-10-15 21:45:13 +00:00
James Mills
5253269b19 Fix consistent coloring of nicks using taigrr's colorhash library (#173)
Fixes #81

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/173
2022-09-25 02:29:27 +00:00
James Mills
7420ff47cc
Update PWA 2022-05-23 00:10:37 +10:00
mlctrez
504c66f7c1 make outbox.state same as client.state to allow persisting last message retrieved (#168)
After testing quite a bit on the saltyim/app client, I tracked down why all outbox messages were being pulled every time a new client starts up.

I believe the outbox client state should be shared with the parent client to allow the last message retrieved from the oubox to be persisted.

Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/168
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-04-29 21:59:40 +00:00
James Mills
994895681d Fix handling for bad endpoints from mixbehaving clients proxying send requests (#163)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/163
Reviewed-by: xuu <xuu@noreply@mills.io>
2022-04-11 22:09:35 +00:00
Sheldon Smith
823c112547 CSS fixes for desktop (#161)
As outlined in [issue #155](https://git.mills.io/saltyim/saltyim/issues/155) and will also improve things such as overflow not working (there's currently no wrapping on overflow) and changing the sidebar and text input to be fixed so only the chatbox scrolls and the text input doesn't overflow off of the view area.

Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/161
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: Sheldon Smith <screem@noreply@mills.io>
Co-committed-by: Sheldon Smith <screem@noreply@mills.io>
2022-04-11 09:59:52 +00:00
mlctrez
364743abf5 fix issue with shared outbox and endpoint modification (#160)
Fixes two issues

cli.me.key.Private() was always nil, outbox hash was the same for everyone 👎

client.Outbox() modified Path variable on endpoint url

Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/160
Reviewed-by: xuu <xuu@noreply@mills.io>
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-04-08 15:30:02 +00:00
James Mills
27473cd84a Update the Desktop breakpoint to by 768px (#158)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/158
Reviewed-by: mlctrez <mlctrez@noreply@mills.io>
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>
2022-04-08 12:45:02 +00:00
mlctrez
fcc4f53f20 navigation drawer is now fixed for > 900px windows (#157)
Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/157
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-04-07 03:43:09 +00:00
James Mills
eece0a7abe
Update to msgbus v0.1.19 2022-04-05 16:12:59 +10:00
James Mills
fce6c97259 Upgrade to msgbus v0.1.18 (#153)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/153
2022-04-05 03:10:29 +00:00
James Mills
d90292bc8e fix_case_insensitive_addrs (#148)
Fixes #144

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/148
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>
2022-04-04 16:09:27 +00:00
James Mills
832fb124fe Improve the registration process, add feedback to the PWA's UX adn use an API for registration (#147)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/147
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>
2022-04-04 16:04:38 +00:00
James Mills
330701da86 Fix SendToAddr to error when no sender configured (#149)
Fixes #145

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/149
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>
2022-04-04 15:38:59 +00:00
James Mills
f3a847674c Add support for state for Service{} (#142)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/142
2022-04-04 03:42:54 +00:00
James Mills
00a11f20fd Fix broken client inbox state persistence (#141)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/141
2022-04-04 02:03:52 +00:00
James Mills
169bbe26ad Upgrade to msgbus v0.1.15 which fixes a deadlock in the Subscribe() API call (#140)
Fixes #139

See also https://git.mills.io/prologic/msgbus/pulls/34

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/140
2022-04-04 01:23:27 +00:00
James Mills
e8110e2a86 Use the new and improved with write-ahead-log (wal) support (#136)
Improves how inbox indices are peristed, hopefully much better now as the topic sequences are now a proper monotonic increasing integer, messages survive crashes/resrarts and so forth.

- [] Remove the `go.mod` replace directive after https://git.mills.io/prologic/msgbus/pulls/33 is merged

cc @xuu

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/136
Reviewed-by: xuu <xuu@noreply@mills.io>
2022-04-03 16:45:59 +00:00
James Mills
237dce3664 Fixes live from @ullarah 😅 (#135)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/135
2022-04-03 09:46:28 +00:00
James Mills
b3ce088a8e Remove inbox index state persistence (for now) (#134)
Until https://git.mills.io/prologic/msgbus/issues/31 is implemented.

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/134
2022-04-03 01:21:35 +00:00
James Mills
908e4cf525 Fix SyntaxError :D (#132)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/132
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>
2022-04-03 01:11:33 +00:00
xuu
5b01e82897 fix: outbox-subscribe (#131)
Co-authored-by: Jon Lundy <jon@xuu.cc>
Co-authored-by: xuu <me@sour.is>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/131
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-04-03 01:03:45 +00:00
xuu
35c4ecca6f feat: sbscribe to outbox (#128)
Co-authored-by: Jon Lundy <jon@xuu.cc>
Co-authored-by: xuu <me@sour.is>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/128
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-04-02 22:32:12 +00:00
James Mills
f66b505d1a Fix GetState() (#129)
Should return `-1` if no state is found.

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/129
2022-04-02 22:27:05 +00:00
James Mills
8a7fb8686c Fix inbox indexing (#125)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/125
2022-04-02 15:58:20 +00:00
James Mills
1cda02bf1b Fix loading non-existent state (#123)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/123
2022-04-02 14:36:20 +00:00
James Mills
6a92c9d30a Add support for indexing and persisting inbox index state (#121)
TODO:

- [ ] Remove `replace` directive after testing...

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/121
2022-04-02 14:15:46 +00:00
James Mills
3fccb3ae5f Add Avatar service and cli for updating avatar on a broker (#116)
This PR also:

- Tidies up the default options and config
- Tidies up the service user code

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/116
2022-04-02 02:59:39 +00:00
James Mills
b885d2cf4d Fix some minor UX issues with the input box (#118)
Partially fixes some of the issuses found in #117

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/118
Reviewed-by: xuu <xuu@noreply@mills.io>
2022-04-01 12:36:38 +00:00
mlctrez
80b5d42fa4 add register button to configuration page (#114)
Adding a new register button to the configuration page that calls client.Register()

When clicked this button uses the identity stored in the local storage which was created either via new identity or update identity buttons.

All errors are logged to the console.  From my tests, I don't have a salty@mlctrez.com user so it fails looking up the service user to send a message to.

Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/114
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-04-01 02:13:19 +00:00
James Mills
4544b1c4cf Remove the use of beeep that causes the PWA on iPhone to crash on startup (#112)
beeep was cuasing the PWA to crash on iPhone with:

```
[Error] Did not parse stylesheet at 'https://salty.mills.io/web/css/micons.woff2' because non CSS MIME types are not allowed in strict mode.
[Log] registering app service worker (app.js, line 12)
[Error] Failed to load resource: the server responded with a status of 404 () (material-components-web.min.css.map, line 0)
[Log] 2022/04/01 08:13:09 connect() (wasm_exec.js, line 22)
[Log] 2022/04/01 08:13:09 creating new client (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Looking up SRV record for _salty._tcp.mills.io" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Using DNSOverHTTPResolver, looking up SRV _salty._tcp.mills.io" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Discovered salty services salty.mills.io" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="map[Accept-Encoding:[br, gzip, deflate] Accept-Ranges:[bytes] Access-Control-Allow-Headers:[*] Access-Control-Allow-Origin:[*] Access-Control-Expose-Headers:[*] Content-Length:[151] Content-Type:[application/json] Date:[Thu, 31 Mar 2022 22:10:02 GMT] Last-Modified:[Mon, 21 Mar 2022 23:59:42 GMT] Vary:[Accept-Encoding, Cookie] X-Salty-Accept-Encoding:[br, gzip, deflate]]" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Discovered endpoint: https://salty.mills.io/inbox/01FYQEP8FS9XBDYZV9ZNRY4ENS" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Discovered capability: accept-encoding: br, gzip, deflate" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Using identity []byte with public key kex1ekt5cru4vs42wnaxppkjn5pexmt2w6uxx9z2mz0fqeuc80e0g9gsggs8ah" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Salty Addr is prologic@mills.io" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Endpoint is https://salty.mills.io/inbox/01FYQEP8FS9XBDYZV9ZNRY4ENS" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Looking up SRV record for _salty._tcp.mills.io" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Using DNSOverHTTPResolver, looking up SRV _salty._tcp.mills.io" (wasm_exec.js, line 22)
[Log] time="2022-04-01T08:13:09+10:00" level=debug msg="Connected to https://salty.mills.io/inbox/01FYQEP8FS9XBDYZV9ZNRY4ENS" (wasm_exec.js, line 22)
[Log] fatal error: panic while printing panic value (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 17 [running]: (wasm_exec.js, line 22)
[Log] runtime.throw({0x19ad82, 0x20}) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:992 +0x7 fp=0x1079620 sp=0x10795f8 pc=0x12600007 (wasm_exec.js, line 22)
[Log] runtime.preprintpanics.func1() (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:529 +0x5 fp=0x1079640 sp=0x1079620 pc=0x12550005 (wasm_exec.js, line 22)
[Log] runtime.deferCallSave(0x1079718, 0x1db388) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:750 +0xe fp=0x1079658 sp=0x1079640 pc=0x125c000e (wasm_exec.js, line 22)
[Log] runtime.runOpenDeferFrame(0x12a0ea0, 0x103fb30) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:723 +0x33 fp=0x10796a0 sp=0x1079658 pc=0x125b0033 (wasm_exec.js, line 22)
[Log] panic({0xcc2e0, 0x12bb800}) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:838 +0x29 fp=0x1079758 sp=0x10796a0 pc=0x125d0029 (wasm_exec.js, line 22)
[Log] runtime.panicwrap() (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/error.go:328 +0x1c fp=0x1079890 sp=0x1079758 pc=0x1090001c (wasm_exec.js, line 22)
[Log] syscall/js.(*Error).Error(0x0) (wasm_exec.js, line 22)
[Log] 	<autogenerated>:1 +0x5 fp=0x10798b8 sp=0x1079890 pc=0x178d0005 (wasm_exec.js, line 22)
[Log] runtime.preprintpanics(0x1079988) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:535 +0xa fp=0x1079910 sp=0x10798b8 pc=0x1256000a (wasm_exec.js, line 22)
[Log] panic({0x15d200, 0x0}) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:939 +0x53 fp=0x10799c8 sp=0x1079910 pc=0x125d0053 (wasm_exec.js, line 22)
[Log] github.com/gen2brain/beeep.Notify.func1() (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/prologic/beeep@v0.0.0-20220331052839-35525ae5ee34/notify_js.go:25 +0xb fp=0x10799f0 sp=0x10799c8 pc=0x42c5000b (wasm_exec.js, line 22)
[Log] runtime.deferCallSave(0x1079ac8, 0x1079c10) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:750 +0xe fp=0x1079a08 sp=0x10799f0 pc=0x125c000e (wasm_exec.js, line 22)
[Log] runtime.runOpenDeferFrame(0x12a0ea0, 0x103fae0) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:723 +0x33 fp=0x1079a50 sp=0x1079a08 pc=0x125b0033 (wasm_exec.js, line 22)
[Log] panic({0xbc2a0, 0x1294ca8}) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/panic.go:838 +0x29 fp=0x1079b08 sp=0x1079a50 pc=0x125d0029 (wasm_exec.js, line 22)
[Log] syscall/js.Value.Get({{}, 0x0, 0x0}, {0x18d181, 0xa}) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/syscall/js/js.go:288 +0xc fp=0x1079b48 sp=0x1079b08 pc=0x174e000c (wasm_exec.js, line 22)
[Log] github.com/gen2brain/beeep.Notify({0x18bd62, 0x8}, {0x1976d0, 0x1c}, {0x0, 0x0}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/prologic/beeep@v0.0.0-20220331052839-35525ae5ee34/notify_js.go:35 +0x8 fp=0x1079c78 sp=0x1079b48 pc=0x42c30008 (wasm_exec.js, line 22)
[Log] github.com/gen2brain/beeep.Alert({0x18bd62, 0x8}, {0x1976d0, 0x1c}, {0x0, 0x0}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/prologic/beeep@v0.0.0-20220331052839-35525ae5ee34/alert_js.go:8 +0x2 fp=0x1079cc0 sp=0x1079c78 pc=0x42bf0002 (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*Client).processMessage(0x1296940, 0x1297640, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:147 +0x2 fp=0x1079e30 sp=0x1079cc0 pc=0x4f610002 (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*Client).Read(0x1296940, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:314 +0x17 fp=0x1079ec0 sp=0x1079e30 pc=0x4f6a0017 (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*Client).Drain.func1() (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:261 +0x5 fp=0x1079fe0 sp=0x1079ec0 pc=0x4f690005 (wasm_exec.js, line 22)
[Log] runtime.goexit() (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/asm_wasm.s:401 +0x1 fp=0x1079fe8 sp=0x1079fe0 pc=0x14480001 (wasm_exec.js, line 22)
[Log] created by go.mills.io/saltyim.(*Client).Drain (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:259 +0x15 (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 1 [chan receive]: (wasm_exec.js, line 22)
[Log] github.com/likexian/doh-go.(*DoH).fastECSQuery(0x103f9f0, {0x288ed0, 0x12af080}, {0x128dc80, 0x2, 0x2}, {0x107ccf0, 0x14}, {0x189fb6, 0x3}, ...) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/doh-go@v0.6.4/doh.go:225 +0x1a (wasm_exec.js, line 22)
[Log] github.com/likexian/doh-go.(*DoH).ECSQuery(0x103f9f0, {0x288ed0, 0x12af080}, {0x107ccf0, 0x14}, {0x189fb6, 0x3}, {0x0, 0x0}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/doh-go@v0.6.4/doh.go:181 +0xc (wasm_exec.js, line 22)
[Log] github.com/likexian/doh-go.(*DoH).Query(...) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/doh-go@v0.6.4/doh.go:158 (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*DNSOverHTTPResolver).LookupSRV(0xc09878, {0x18a96c, 0x5}, {0x18a0e5, 0x3}, {0x107cc51, 0x8}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/resolv.go:62 +0x13 (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*Addr).Refresh(0x12aec00) (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/lookup.go:179 +0xd (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.LookupAddr({0x107cc48, 0x11}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/lookup.go:246 +0x4 (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*ProxyLookup).LookupAddr(0x12a3360, {0x107cc48, 0x11}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/lookup.go:271 +0x3 (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*Client).getAddr(0x1296940, {0x107cc48, 0x11}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:124 +0x8 (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*Client).Lookup(...) (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:345 (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim/internal/pwa/components.(*ChatMessage).Render(0x10b4c00) (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/internal/pwa/components/chatmessage.go:27 +0x13 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.(*Compo).render(0x10b4c00) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/component.go:442 +0x6 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.(*Compo).mount(0x10b4c00, {0x28cd38, 0x107fc20}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/component.go:293 +0x22 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.mount({0x28cd38, 0x107fc20}, {0x28e000, 0x10b4c00}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/node.go:188 +0x5 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.(*elem).replaceChildAt(0x128f220, 0x0, {0x28e000, 0x10b4c00}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/element.go:238 +0x8 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.(*elem).update(0x128f220, {0x28d300, 0x12bda40}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/element.go:172 +0x3f (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.update({0x28d300, 0x128f220}, {0x28d300, 0x12bda40}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/node.go:199 +0x8 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.(*Compo).updateRoot(0x10b4880) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/component.go:386 +0x5 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.(*engine).updateComponents(0x107fc20) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/engine.go:419 +0x18 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.(*engine).start.func1() (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/engine.go:347 +0x1c (wasm_exec.js, line 22)
[Log] sync.(*Once).doSlow(0x107fc8c, 0x1271d18) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/sync/once.go:68 +0x9 (wasm_exec.js, line 22)
[Log] sync.(*Once).Do(0x107fc8c, 0x1271d18) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/sync/once.go:59 +0x6 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.(*engine).start(0x107fc20, {0x288e98, 0x101e040}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/engine.go:323 +0x4 (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.RunWhenOnBrowser() (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/app.go:152 +0x86 (wasm_exec.js, line 22)
[Log] main.main() (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/internal/pwa/main.go:18 +0x2 (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 9 [select]: (wasm_exec.js, line 22)
[Log] github.com/likexian/gokit/xcache/memory.(*Objects).gc(0x1260b80) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/gokit@v0.25.6/xcache/memory/memory.go:244 +0xc (wasm_exec.js, line 22)
[Log] created by github.com/likexian/gokit/xcache/memory.New (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/gokit@v0.25.6/xcache/memory/memory.go:76 +0x12 (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 15 [chan receive]: (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim/internal/pwa/components.(*SaltyChat).connect.func1() (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/internal/pwa/components/saltychat.go:116 +0xd (wasm_exec.js, line 22)
[Log] github.com/maxence-charriere/go-app/v9/pkg/app.(*engine).Async.func1() (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/engine.go:124 +0x4 (wasm_exec.js, line 22)
[Log] created by github.com/maxence-charriere/go-app/v9/pkg/app.(*engine).Async (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/maxence-charriere/go-app/v9@v9.4.1/pkg/app/engine.go:123 +0xb (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 20 [select]: (wasm_exec.js, line 22)
[Log] github.com/likexian/doh-go.Use.func1() (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/doh-go@v0.6.4/doh.go:122 +0xa (wasm_exec.js, line 22)
[Log] created by github.com/likexian/doh-go.Use (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/doh-go@v0.6.4/doh.go:119 +0x14 (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 14 [waiting]: (wasm_exec.js, line 22)
[Log] runtime.gopark(0x0, 0x0, 0x0, 0x0, 0x1) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/proc.go:361 +0x27 (wasm_exec.js, line 22)
[Log] runtime.handleEvent() (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/lock_js.go:249 +0x1b (wasm_exec.js, line 22)
[Log] runtime.goexit() (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/runtime/asm_wasm.s:401 +0x1 (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 18 [select]: (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*Client).Drain.func2() (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:284 +0x9 (wasm_exec.js, line 22)
[Log] created by go.mills.io/saltyim.(*Client).Drain (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:281 +0x2c (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 19 [select]: (wasm_exec.js, line 22)
[Log] nhooyr.io/websocket.dial({0x288e98, 0x101e040}, {0x1085740, 0x35}, 0x0) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/nhooyr.io/websocket@v1.8.7/ws_js.go:278 +0x1e (wasm_exec.js, line 22)
[Log] nhooyr.io/websocket.Dial({0x288e98, 0x101e040}, {0x1085740, 0x35}, 0x0) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/nhooyr.io/websocket@v1.8.7/ws_js.go:247 +0x2 (wasm_exec.js, line 22)
[Log] git.mills.io/prologic/msgbus/client.(*Subscriber).connect(0x12aed80) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/git.mills.io/prologic/msgbus@v0.1.13-0.20220329220338-7181b6df1bd6/client/client.go:212 +0x12 (wasm_exec.js, line 22)
[Log] created by git.mills.io/prologic/msgbus/client.(*Subscriber).Start (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/git.mills.io/prologic/msgbus@v0.1.13-0.20220329220338-7181b6df1bd6/client/client.go:247 +0x7 (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 21 [select]: (wasm_exec.js, line 22)
[Log] net/http.(*Transport).RoundTrip(0x1282dc0, 0x10b0d00) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/net/http/roundtrip_js.go:193 +0x8e (wasm_exec.js, line 22)
[Log] net/http.send(0x10b0d00, {0x2857b8, 0x1282dc0}, {0x0, 0x0, 0x0}) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/net/http/client.go:252 +0x88 (wasm_exec.js, line 22)
[Log] net/http.(*Client).send(0x12c0ba0, 0x10b0d00, {0x0, 0x0, 0x0}) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/net/http/client.go:176 +0x11 (wasm_exec.js, line 22)
[Log] net/http.(*Client).do(0x12c0ba0, 0x10b0d00) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/net/http/client.go:725 +0xc5 (wasm_exec.js, line 22)
[Log] net/http.(*Client).Do(...) (wasm_exec.js, line 22)
[Log] 	/usr/local/go/src/net/http/client.go:593 (wasm_exec.js, line 22)
[Log] github.com/likexian/gokit/xhttp.(*Request).Do(0x10b4e00, {0x288e60, 0x12975c0}, {0x189f62, 0x3}, {0x19dac6, 0x24}, {0x1047eb0, 0x2, 0x2}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/gokit@v0.25.6/xhttp/xhttp.go:685 +0x1d5 (wasm_exec.js, line 22)
[Log] github.com/likexian/gokit/xhttp.(*Request).Get(...) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/gokit@v0.25.6/xhttp/xhttp.go:285 (wasm_exec.js, line 22)
[Log] github.com/likexian/doh-go/provider/cloudflare.(*Provider).ECSQuery(0x12ad728, {0x288e60, 0x12975c0}, {0x107ccf0, 0x14}, {0x189fb6, 0x3}, {0x0, 0x0}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/doh-go@v0.6.4/provider/cloudflare/cloudflare.go:110 +0x30 (wasm_exec.js, line 22)
[Log] github.com/likexian/doh-go.(*DoH).fastECSQuery.func1(0x0, {0x2881f8, 0x12ad728}) (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/doh-go@v0.6.4/doh.go:201 +0x4 (wasm_exec.js, line 22)
[Log] created by github.com/likexian/doh-go.(*DoH).fastECSQuery (wasm_exec.js, line 22)
[Log] 	/home/mattman/go/pkg/mod/github.com/likexian/doh-go@v0.6.4/doh.go:200 +0x5e (wasm_exec.js, line 22)
[Log]  (wasm_exec.js, line 22)
[Log] goroutine 23 [chan receive (nil chan)]: (wasm_exec.js, line 22)
[Log] go.mills.io/saltyim.(*Client).Subscribe.func1() (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:333 +0x5 (wasm_exec.js, line 22)
[Log] created by go.mills.io/saltyim.(*Client).Subscribe (wasm_exec.js, line 22)
[Log] 	/home/mattman/golang/saltyim/client.go:332 +0x26 (wasm_exec.js, line 22)
[Warning] exit code: – 2 (wasm_exec.js, line 101)
[Error] Error: Go program has already exited
	_resume (wasm_exec.js:536)
	(anonymous function) (wasm_exec.js:549)
[Error] Unhandled Promise Rejection: Error: Go program has already exited
	_resume (wasm_exec.js:536)
	(anonymous function) (wasm_exec.js:549)
	promiseReactionJob
```

Which I have no fucking clue what's going on there :/

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/112
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: James Mills <james@mills.io>
Co-committed-by: James Mills <james@mills.io>
2022-03-31 23:06:08 +00:00
mlctrez
a085cf9a14 bring_back_salt_shaker (#111)
Makes the avatar url point to salt shaker icon in application when no avatar found on lookup.

Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/111
Reviewed-by: James Mills <james@mills.io>
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-03-31 22:20:06 +00:00
xuu
0eb020783e fix: lookup avatar (#110)
Co-authored-by: xuu <me@sour.is>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/110
2022-03-31 21:50:22 +00:00
mlctrez
53e79b449b chat_window_formatting (#102)
![image](/attachments/8d560ad1-bcf7-44c6-940e-3e386f9cc2b6)

trying out message formatting in the style of text message chatting where incoming is left justified and send messages are right justified

only the last message will have a timestamp

WIP until onClick displays timestamp of message

Co-authored-by: mlctrez <mlctrez@gmail.com>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/102
Reviewed-by: xuu <xuu@noreply@mills.io>
Co-authored-by: mlctrez <mlctrez@noreply@mills.io>
Co-committed-by: mlctrez <mlctrez@noreply@mills.io>
2022-03-31 21:38:34 +00:00
xuu
b11d14a274 fix: avatar, add logging (#109)
Co-authored-by: xuu <me@sour.is>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/109
2022-03-31 21:19:45 +00:00
James Mills
3373a58908 Code cleanup, remove RegisterEndpoint() (#104)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/104
Reviewed-by: xuu <xuu@noreply@mills.io>
2022-03-31 10:46:28 +00:00