hopefully implement a deprecation warning for whatsapp
This commit is contained in:
parent
b1fa9df5f5
commit
7a736062d9
|
@ -347,6 +347,7 @@ func (portal *Portal) getMessageIntent(user *User, info whatsapp.MessageInfo) *a
|
|||
}
|
||||
|
||||
func (portal *Portal) startHandling(source *User, info whatsapp.MessageInfo) *appservice.IntentAPI {
|
||||
portal.bridge.Relaybot.sendBridgeNotice("WhatsApp ist deprecated! Matrix benutzen!")
|
||||
// TODO these should all be trace logs
|
||||
if portal.lastMessageTs > info.Timestamp+1 {
|
||||
portal.log.Debugfln("Not handling %s: message is older (%d) than last bridge message (%d)", info.Id, info.Timestamp, portal.lastMessageTs)
|
||||
|
@ -1358,6 +1359,7 @@ func (portal *Portal) HandleTextMessage(source *User, message whatsapp.TextMessa
|
|||
portal.SetReply(content, message.ContextInfo)
|
||||
|
||||
_, _ = intent.UserTyping(portal.MXID, false, 0)
|
||||
|
||||
resp, err := portal.sendMessage(intent, event.EventMessage, content, int64(message.Info.Timestamp*1000))
|
||||
if err != nil {
|
||||
portal.log.Errorfln("Failed to handle message %s: %v", message.Info.Id, err)
|
||||
|
|
Loading…
Reference in a new issue