github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/teambot/init.go (about)

     1  package teambot
     2  
     3  import (
     4  	"github.com/keybase/client/go/libkb"
     5  )
     6  
     7  func NewTeambotKeyersAndInstall(mctx libkb.MetaContext) {
     8  	botKeyer := NewBotKeyer(mctx)
     9  	memberKeyer := NewMemberKeyer(mctx)
    10  	mctx.G().AddLogoutHook(botKeyer, "TeambotBotKeyer")
    11  	mctx.G().AddLogoutHook(memberKeyer, "TeambotMemberKeyer")
    12  	mctx.G().AddDbNukeHook(botKeyer, "TeambotBotKeyer")
    13  	mctx.G().AddDbNukeHook(memberKeyer, "TeambotMember")
    14  	mctx.G().SetTeambotBotKeyer(botKeyer)
    15  	mctx.G().SetTeambotMemberKeyer(memberKeyer)
    16  }
    17  
    18  func ServiceInit(mctx libkb.MetaContext) {
    19  	NewTeambotKeyersAndInstall(mctx)
    20  }