github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/service/chat_local.go (about) 1 // Copyright 2016 Keybase, Inc. All rights reserved. Use of 2 // this source code is governed by the included BSD license. 3 4 package service 5 6 import ( 7 "github.com/keybase/client/go/chat" 8 "github.com/keybase/client/go/chat/globals" 9 "github.com/keybase/client/go/libkb" 10 "github.com/keybase/client/go/protocol/keybase1" 11 "github.com/keybase/go-framed-msgpack-rpc/rpc" 12 ) 13 14 // chatLocalHandler implements keybase1.chatLocal. 15 type chatLocalHandler struct { 16 *BaseHandler 17 *chat.Server 18 } 19 20 // newChatLocalHandler creates a chatLocalHandler. 21 func newChatLocalHandler(xp rpc.Transporter, g *globals.Context, gh *gregorHandler) *chatLocalHandler { 22 h := &chatLocalHandler{ 23 BaseHandler: NewBaseHandler(g.ExternalG(), xp), 24 } 25 h.Server = chat.NewServer(g, gh, h) 26 return h 27 } 28 29 func (h *chatLocalHandler) GetChatUI(sessionID int) libkb.ChatUI { 30 return h.BaseHandler.getChatUI(sessionID) 31 } 32 33 func (h *chatLocalHandler) GetStreamUICli() *keybase1.StreamUiClient { 34 return h.BaseHandler.getStreamUICli() 35 }