Add welcome message functionality
(Telegram and whatsapp for now)
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
EventWelcomeMsg = "welcome"
|
||||
EventJoinLeave = "join_leave"
|
||||
EventTopicChange = "topic_change"
|
||||
EventFailure = "failure"
|
||||
|
||||
@@ -287,7 +287,9 @@ func (b *Btelegram) handleUserJoin(update tgbotapi.Update) {
|
||||
Event: config.EventJoinLeave,
|
||||
Text: "joined chat",
|
||||
}
|
||||
b.Remote <- rmsg
|
||||
|
||||
rmsg.Event = config.EventWelcomeMsg
|
||||
b.Remote <- rmsg
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,9 @@ func (b *Bwhatsapp) handleUserJoin(event *events.GroupInfo) {
|
||||
Event: config.EventJoinLeave,
|
||||
Text: "joined chat",
|
||||
}
|
||||
b.Remote <- rmsg
|
||||
|
||||
rmsg.Event = config.EventWelcomeMsg
|
||||
b.Remote <- rmsg
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user