diff --git a/go.mod b/go.mod index b647fad930cf1e95bee0b2d21381dad828fba49f..92729f166a5c5dd9ffbcb2bbe6b6fa968ff0fb8e 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/spf13/cobra v1.7.0 github.com/spf13/jwalterweatherman v1.1.0 github.com/stretchr/testify v1.8.2 - gitlab.com/elixxir/client/v4 v4.6.4-0.20230609202435-f11faed4ed86 + gitlab.com/elixxir/client/v4 v4.6.4-0.20230612182324-0a6cd85ae379 gitlab.com/elixxir/crypto v0.0.7-0.20230607170539-92d9508c78f9 gitlab.com/elixxir/primitives v0.0.3-0.20230214180039-9a25e2d3969c gitlab.com/elixxir/wasm-utils v0.0.0-20230607204433-22c46f9d680f diff --git a/go.sum b/go.sum index a628fb73adb57d9999e24dc1c31eddb1969de5c4..db9781a752a8eafa145096a3da657fecda616d93 100644 --- a/go.sum +++ b/go.sum @@ -529,6 +529,8 @@ gitlab.com/elixxir/client/v4 v4.6.4-0.20230608200437-584a2b57d36e h1:3pl7L/PD93A gitlab.com/elixxir/client/v4 v4.6.4-0.20230608200437-584a2b57d36e/go.mod h1:GyXpu03l8AybmrGSq+AiKTuB+oJI5of78MdvdqFo29U= gitlab.com/elixxir/client/v4 v4.6.4-0.20230609202435-f11faed4ed86 h1:3sfCFr9ihYZ0oz9E9qO7fK6a9ao82AB0uWAMoV9x0xg= gitlab.com/elixxir/client/v4 v4.6.4-0.20230609202435-f11faed4ed86/go.mod h1:GyXpu03l8AybmrGSq+AiKTuB+oJI5of78MdvdqFo29U= +gitlab.com/elixxir/client/v4 v4.6.4-0.20230612182324-0a6cd85ae379 h1:yIlAUf1cRlZQJrzdT0knJJZcDifDswHTc66cZHVpZRw= +gitlab.com/elixxir/client/v4 v4.6.4-0.20230612182324-0a6cd85ae379/go.mod h1:GyXpu03l8AybmrGSq+AiKTuB+oJI5of78MdvdqFo29U= gitlab.com/elixxir/comms v0.0.4-0.20230519211512-4a998f4b0938 h1:f27+QUFiGWrprKm+fstOg3ABkYLpWcZi3+8Lf5eDnqY= gitlab.com/elixxir/comms v0.0.4-0.20230519211512-4a998f4b0938/go.mod h1:z+qW0D9VpY5QKTd7wRlb5SK4kBNqLYsa4DXBcUXue9Q= gitlab.com/elixxir/crypto v0.0.7-0.20230607170539-92d9508c78f9 h1:+RZcoU7NOPXCenkKM/ImYyLcNDdG4vsWrJyKqoAAv8k= diff --git a/wasm/channelsFileTransfer.go b/wasm/channelsFileTransfer.go index 2a76200423e1ac2aefb94a90857e8c70dc7777c1..c96b547283a1b7d337666c17ef846370d4344825 100644 --- a/wasm/channelsFileTransfer.go +++ b/wasm/channelsFileTransfer.go @@ -10,10 +10,11 @@ package wasm import ( + "syscall/js" + "gitlab.com/elixxir/client/v4/bindings" "gitlab.com/elixxir/wasm-utils/exception" "gitlab.com/elixxir/wasm-utils/utils" - "syscall/js" ) // ChannelsFileTransfer wraps the [bindings.ChannelsFileTransfer] object so its @@ -193,6 +194,8 @@ func (cft *ChannelsFileTransfer) Upload(_ js.Value, args []js.Value) any { // the channel (int). For the maximum amount of time, use [ValidForever]. // - args[6] - JSON of [xxdk.CMIXParams] (Uint8Array). If left empty, // [GetDefaultCMixParams] will be used internally. +// - args[7] - JSON of a slice of public keys of users that should receive +// mobile notifications for the message. // // Returns a promise: // - Resolves to the JSON of [bindings.ChannelSendReport] (Uint8Array). @@ -206,11 +209,13 @@ func (cft *ChannelsFileTransfer) Send(_ js.Value, args []js.Value) any { preview = utils.CopyBytesToGo(args[4]) validUntilMS = args[5].Int() cmixParamsJSON = utils.CopyBytesToGo(args[6]) + pingsJSON = utils.CopyBytesToGo(args[7]) ) promiseFn := func(resolve, reject func(args ...any) js.Value) { - fileID, err := cft.api.Send(channelIdBytes, fileLinkJSON, fileName, - fileType, preview, validUntilMS, cmixParamsJSON) + fileID, err := cft.api.Send(channelIdBytes, fileLinkJSON, + fileName, fileType, preview, validUntilMS, + cmixParamsJSON, pingsJSON) if err != nil { reject(exception.NewTrace(err)) } else {