Skip to content
Snippets Groups Projects
Commit de4a8b48 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Add GetStorageTag

parent 731939b7
No related branches found
No related tags found
1 merge request!67fix for latest client release
This commit is part of merge request !67. Comments created here will be created in the context of that merge request.
...@@ -47,6 +47,7 @@ func newDMClientJS(api *bindings.DMClient) map[string]any { ...@@ -47,6 +47,7 @@ func newDMClientJS(api *bindings.DMClient) map[string]any {
"ExportPrivateIdentity": js.FuncOf(cm.ExportPrivateIdentity), "ExportPrivateIdentity": js.FuncOf(cm.ExportPrivateIdentity),
"SetNickname": js.FuncOf(cm.SetNickname), "SetNickname": js.FuncOf(cm.SetNickname),
"GetNickname": js.FuncOf(cm.GetNickname), "GetNickname": js.FuncOf(cm.GetNickname),
"GetStorageTag": js.FuncOf(cm.GetStorageTag),
// DM Sending Methods and Reports // DM Sending Methods and Reports
"SendText": js.FuncOf(cm.SendText), "SendText": js.FuncOf(cm.SendText),
...@@ -485,6 +486,18 @@ func (ch *DMClient) GetNickname(_ js.Value, args []js.Value) any { ...@@ -485,6 +486,18 @@ func (ch *DMClient) GetNickname(_ js.Value, args []js.Value) any {
return nickname 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 // // Channel Receiving Logic and Callback Registration //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment