Skip to content
Snippets Groups Projects
Commit b635941d authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

Merge branch 'release' into 'XX-4512/DisableUsersImpl'

# Conflicts:
#   go.mod
#   go.sum
#   wasm/dm.go
parents dca40e1d 43020470
No related branches found
No related tags found
1 merge request!76added first implementation for disabling users in DM indexedDb package
...@@ -135,7 +135,7 @@ func (w *wasmModel) ReceiveReply(messageID, reactionTo message.ID, nickname, ...@@ -135,7 +135,7 @@ func (w *wasmModel) ReceiveReply(messageID, reactionTo message.ID, nickname,
uuid, err := w.receiveWrapper(messageID, &reactionTo, nickname, text, uuid, err := w.receiveWrapper(messageID, &reactionTo, nickname, text,
partnerKey, senderKey, dmToken, codeset, timestamp, round, partnerKey, senderKey, dmToken, codeset, timestamp, round,
dm.TextType, status) dm.ReplyType, status)
if err != nil { if err != nil {
jww.ERROR.Printf("%+v", errors.WithMessagef(err, parentErr)) jww.ERROR.Printf("%+v", errors.WithMessagef(err, parentErr))
return 0 return 0
......
...@@ -467,17 +467,14 @@ func (dmc *DMClient) SetNickname(_ js.Value, args []js.Value) any { ...@@ -467,17 +467,14 @@ func (dmc *DMClient) SetNickname(_ js.Value, args []js.Value) any {
return nil return nil
} }
// GetNickname returns the nickname set for a given channel. Returns an error if // GetNickname returns the nickname set for this user. Returns an error if
// there is no nickname set. // there is no nickname set.
// //
// Parameters:
// - args[0] - Marshalled bytes if the channel's [id.ID] (Uint8Array).
//
// Returns: // Returns:
// - The nickname (string). // - The nickname (string).
// - Throws TypeError if the channel has no nickname set. // - Throws TypeError if the channel has no nickname set.
func (dmc *DMClient) GetNickname(_ js.Value, _ []js.Value) any { func (ch *DMClient) GetNickname(_ js.Value, args []js.Value) any {
nickname, err := dmc.api.GetNickname() nickname, err := ch.api.GetNickname()
if err != nil { if err != nil {
utils.Throw(utils.TypeError, err) utils.Throw(utils.TypeError, err)
return nil return nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment