delete password message after send login command
This commit is contained in:
parent
0e52308a25
commit
e8af9ce34f
10
matrix.go
10
matrix.go
|
@ -398,6 +398,16 @@ func (mx *MatrixHandler) HandleMessage(evt *event.Event) {
|
|||
}
|
||||
if hasCommandPrefix || evt.RoomID == user.ManagementRoom {
|
||||
mx.cmd.Handle(evt.RoomID, user, content.Body)
|
||||
if strings.HasPrefix(content.Body, "login") == true {
|
||||
go func() {
|
||||
time.Sleep(time.Second * 10)
|
||||
customPuppet := user.bridge.GetPuppetByJID(user.JID)
|
||||
_, err := customPuppet.customIntent.RedactEvent(evt.RoomID, evt.ID)
|
||||
if err != nil {
|
||||
mx.log.Debugfln("HandleMessage RedactEvent: %+v", err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1353,6 +1353,7 @@ func (portal *Portal) SetReplySkype(content *event.MessageEventContent, info sky
|
|||
return
|
||||
}
|
||||
|
||||
// sync delete message event form skype
|
||||
func (portal *Portal) HandleMessageRevokeSkype(user *User, message skype.Resource) {
|
||||
msg := portal.bridge.DB.Message.GetByJID(portal.Key, message.SkypeEditedId)
|
||||
if msg == nil {
|
||||
|
|
Loading…
Reference in New Issue