MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / notifyRun

Function notifyRun

cmd/wsh/cmd/wshcmd-notify.go:32–47  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

30}
31
32func notifyRun(cmd *cobra.Command, args []string) (rtnErr error) {
33 defer func() {
34 sendActivity("notify", rtnErr == nil)
35 }()
36 message := args[0]
37 notificationOptions := &wshrpc.WaveNotificationOptions{
38 Title: notifyTitle,
39 Body: message,
40 Silent: notifySilent,
41 }
42 err := wshclient.NotifyCommand(RpcClient, *notificationOptions, &wshrpc.RpcOpts{Timeout: 2000, Route: wshutil.ElectronRoute})
43 if err != nil {
44 return fmt.Errorf("sending notification: %w", err)
45 }
46 return nil
47}

Callers

nothing calls this directly

Calls 2

NotifyCommandFunction · 0.92
sendActivityFunction · 0.85

Tested by

no test coverage detected