diff --git a/go.mod b/go.mod index 6378a9321c9e9bcd82469f081e92f6bac119c96b..a98aabed604fa26c1fec71fb0e23f5b098ba8dc7 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/hack-pad/go-indexeddb v0.2.0 github.com/pkg/errors v0.9.1 github.com/spf13/jwalterweatherman v1.1.0 - gitlab.com/elixxir/client/v4 v4.3.9-0.20221122010204-41d091b9b031 + gitlab.com/elixxir/client/v4 v4.3.9-0.20221201224548-883cf51c4d60 gitlab.com/elixxir/crypto v0.0.7-0.20221121233335-83f145891bc7 gitlab.com/elixxir/primitives v0.0.3-0.20221114231218-cc461261a6af gitlab.com/xx_network/crypto v0.0.5-0.20221121220724-8eefdbb0eb46 diff --git a/go.sum b/go.sum index 02cf1955b42ec45bb5b4a7b0ca469ea0b0ded3e4..a23124be3b9f83102d981d5d67c4692c307d96fe 100644 --- a/go.sum +++ b/go.sum @@ -369,8 +369,8 @@ github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= gitlab.com/elixxir/bloomfilter v0.0.0-20211222005329-7d931ceead6f h1:yXGvNBqzZwAhDYlSnxPRbgor6JWoOt1Z7s3z1O9JR40= gitlab.com/elixxir/bloomfilter v0.0.0-20211222005329-7d931ceead6f/go.mod h1:H6jztdm0k+wEV2QGK/KYA+MY9nj9Zzatux/qIvDDv3k= -gitlab.com/elixxir/client/v4 v4.3.9-0.20221122010204-41d091b9b031 h1:p4EkUqPNSwC6cbCd2ulqyH7J5M+ZGXmWeLDNuF+wa0M= -gitlab.com/elixxir/client/v4 v4.3.9-0.20221122010204-41d091b9b031/go.mod h1:e2EC5b3ucHaVeR9DjGcoKNnDBbVPPPG2dHtpPGDrFhM= +gitlab.com/elixxir/client/v4 v4.3.9-0.20221201224548-883cf51c4d60 h1:fZLbgqE4Lskkao4MQzxCBGVN+GuJfBy7/BtxG/xkaTw= +gitlab.com/elixxir/client/v4 v4.3.9-0.20221201224548-883cf51c4d60/go.mod h1:e2EC5b3ucHaVeR9DjGcoKNnDBbVPPPG2dHtpPGDrFhM= gitlab.com/elixxir/comms v0.0.4-0.20221110181420-84bca6216fe4 h1:bLRjVCyMVde4n2hTVgoyyIAWrKI4CevpChchkPeb6A0= gitlab.com/elixxir/comms v0.0.4-0.20221110181420-84bca6216fe4/go.mod h1:XhI2/CMng+xcH3mAs+1aPz29PSNu1079XMJ8V+xxihw= gitlab.com/elixxir/crypto v0.0.7-0.20221121233335-83f145891bc7 h1:yhc8jQ27JKypdRE41NpfJPaYRS0sNkOwugaIyoscDiU= diff --git a/wasm/channels.go b/wasm/channels.go index 7f89277fcc7e215cdc4e795bb9c2fb1b6e65c3fc..e9d0137b6a682085828d78213dd1f1855d83314b 100644 --- a/wasm/channels.go +++ b/wasm/channels.go @@ -1125,11 +1125,13 @@ func (ch *ChannelsManager) SendReaction(_ js.Value, args []js.Value) any { return utils.CreatePromise(promiseFn) } -// DeleteMessage is used to send a reaction to a message over a channel. The -// reaction must be a single emoji with no other characters, and will be -// rejected otherwise. +// DeleteMessage deletes the targeted message from user's view. Users may delete +// their own messages (by leaving the private key as nil) but only the channel +// admin can delete other user's messages. // -// Users will drop the reaction if they do not recognize the reactTo message. +// If undoAction is true, then the targeted message is un-deleted. +// +// Clients will drop the deletion if they do not recognize the target message. // // Parameters: // - args[0] - The PEM-encoded admin RSA private key for the channel @@ -1165,9 +1167,10 @@ func (ch *ChannelsManager) DeleteMessage(_ js.Value, args []js.Value) any { return utils.CreatePromise(promiseFn) } -// PinMessage pins the target message to the top of a channel view for all -// users in the specified channel. Only the channel admin can pin user -// messages. +// PinMessage pins the target message to the top of a channel view for all users +// in the specified channel. Only the channel admin can pin user messages. +// +// If undoAction is true, then the targeted message is unpinned. // // Clients will drop the pin if they do not recognize the target message. // @@ -1177,7 +1180,7 @@ func (ch *ChannelsManager) DeleteMessage(_ js.Value, args []js.Value) any { // - args[1] - Marshalled bytes of channel [id.ID] (Uint8Array). // - args[2] - The marshalled [channel.MessageID] of the message you want to // pin (Uint8Array). -// - args[3] - Set to true to un-delete the message (boolean). +// - args[3] - Set to true to unpin the message (boolean). // - args[4] - JSON of [xxdk.CMIXParams]. This may be empty, and // [GetDefaultCMixParams] will be used internally (Uint8Array). // @@ -1215,7 +1218,7 @@ func (ch *ChannelsManager) PinMessage(_ js.Value, args []js.Value) any { // - args[1] - Marshalled bytes of channel [id.ID] (Uint8Array). // - mutedUserPubKeyBytes - The [ed25519.PublicKey] of the user you want to // mute. -// - args[3] - Set to true to un-delete the message (boolean). +// - args[3] - Set to true to unmute the message (boolean). // - args[4] - JSON of [xxdk.CMIXParams]. This may be empty, and // [GetDefaultCMixParams] will be used internally (Uint8Array). //