Skip to content
Snippets Groups Projects

fix for latest client release

Merged Jake Taylor requested to merge release into master
1 file
+ 13
0
Compare changes
  • Side-by-side
  • Inline
+ 13
0
@@ -47,6 +47,7 @@ func newDMClientJS(api *bindings.DMClient) map[string]any {
"ExportPrivateIdentity": js.FuncOf(cm.ExportPrivateIdentity),
"SetNickname": js.FuncOf(cm.SetNickname),
"GetNickname": js.FuncOf(cm.GetNickname),
"GetStorageTag": js.FuncOf(cm.GetStorageTag),
// DM Sending Methods and Reports
"SendText": js.FuncOf(cm.SendText),
@@ -485,6 +486,18 @@ func (ch *DMClient) GetNickname(_ js.Value, args []js.Value) any {
return nickname
}
// GetStorageTag returns the storage tag, so users listening to the database
// can separately listen and read updates there.
//
// Parameters:
//
// Returns:
// - The storage tag (string).
func (dmc *DMClient) GetStorageTag(_ js.Value, args []js.Value) any {
return (base64.RawStdEncoding.EncodeToString(dmc.api.GetIdentity()) +
"_speakeasy_dm")
}
////////////////////////////////////////////////////////////////////////////////
// Channel Receiving Logic and Callback Registration //
////////////////////////////////////////////////////////////////////////////////
Loading