Ver código fonte

Call AdminTest() right after connecting

Tulir Asokan 4 anos atrás
pai
commit
31049cd4d5
1 arquivos alterados com 7 adições e 0 exclusões
  1. 7 0
      user.go

+ 7 - 0
user.go

@@ -454,6 +454,13 @@ func (user *User) intPostLogin() {
 	user.createCommunity()
 	user.tryAutomaticDoublePuppeting()
 
+	err := user.Conn.AdminTest()
+	if err != nil {
+		user.sendMarkdownBridgeAlert("Post-connection ping failed: %v", err)
+	} else {
+		user.log.Debugln("Post-login ping OK")
+	}
+
 	select {
 	case <-user.chatListReceived:
 		user.log.Debugln("Chat list receive confirmation received in PostLogin")