import ( "github.com/mattermost/platform/model" ) func main() { // create a new ChannelMember object cm := &model.ChannelMember{ NotifyProps: &model.NotifyProps{ MarkUnread: "mention", DesktopSound: "notification", MobilePushSound: "notification", }, } // set notification properties for the channel member cm.NotifyProps.Push = "on" cm.NotifyProps.PushStatus = "offline" // use the ChannelMember object as needed }
import ( "github.com/mattermost/platform/model" ) func main() { // retrieve a ChannelMember object from the server cm, _ := client.GetChannelMember(channelID, userID, "") // set the notification properties for the channel member cm.NotifyProps.MarkUnread = "mention" cm.NotifyProps.Push = "on" cm.NotifyProps.PushStatus = "offline" // update the ChannelMember object on the server client.UpdateChannelMember(cm) }In this example, we retrieve a ChannelMember object from the server using the `GetChannelMember` function. We then update its notification properties and use the `UpdateChannelMember` function to update the ChannelMember object on the server.