Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeywordReplacer ¶
type KeywordReplacer struct {
// contains filtered or unexported fields
}
KeywordReplacer replaces keywords in messages
func NewKeywordReplacer ¶
func NewKeywordReplacer(replacements map[string]string) *KeywordReplacer
NewKeywordReplacer creates a new keyword replacer middleware
func (*KeywordReplacer) ProcessIncoming ¶
func (k *KeywordReplacer) ProcessIncoming(sender, content string) (string, bool)
ProcessIncoming replaces keywords in incoming messages
func (*KeywordReplacer) ProcessOutgoing ¶
func (k *KeywordReplacer) ProcessOutgoing(content string) (string, bool)
ProcessOutgoing replaces keywords in outgoing messages
Click to show internal directories.
Click to hide internal directories.