MCPcopy Create free account
hub / github.com/chanify/chanify / TextContent

Method TextContent

model/message.go:93–109  ·  view source on GitHub ↗

TextContent set text notification

(text string, title string, copytext string, autocopy string)

Source from the content-addressed store, hash-verified

91
92// TextContent set text notification
93func (m *Message) TextContent(text string, title string, copytext string, autocopy string) *Message {
94 ctx := &pb.MsgContent{
95 Type: pb.MsgType_Text,
96 Text: text,
97 }
98 if len(title) > 0 {
99 ctx.Title = title
100 }
101 if len(copytext) > 0 {
102 ctx.Copytext = copytext
103 }
104 if len(autocopy) > 0 {
105 ctx.Flags = 1
106 }
107 m.Content, _ = proto.Marshal(ctx)
108 return m
109}
110
111// ActionContent set custom action notification
112func (m *Message) ActionContent(text string, title string, actions []string) *Message {

Callers 3

makeTextContentMethod · 0.80
TestSendDirectFunction · 0.80
TestSendMsgFunction · 0.80

Calls 1

MarshalMethod · 0.80

Tested by 2

TestSendDirectFunction · 0.64
TestSendMsgFunction · 0.64