mirror of
https://git.mills.io/saltyim/saltyim.git
synced 2024-06-25 00:08:26 +00:00
Code cleanup
This commit is contained in:
parent
fa26923d54
commit
3f025d1ebb
@ -87,7 +87,7 @@ func NewClient(me *Addr, options ...IdentityOption) (*Client, error) {
|
|||||||
|
|
||||||
// CreateOrLoadClient creates a Client by creating or loading an existing identity
|
// CreateOrLoadClient creates a Client by creating or loading an existing identity
|
||||||
// from the given identity file and name of the client's user address
|
// from the given identity file and name of the client's user address
|
||||||
func CreateOrLoadBotClient(fn, name string) (*Client, error) {
|
func CreateOrLoadClient(fn, name string) (*Client, error) {
|
||||||
me, err := ParseAddr(name)
|
me, err := ParseAddr(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -228,7 +228,7 @@ func (s *Server) setupSvcUser() {
|
|||||||
|
|
||||||
// create or load client for services user
|
// create or load client for services user
|
||||||
identity := filepath.Join(s.config.Data, servicesIdentity)
|
identity := filepath.Join(s.config.Data, servicesIdentity)
|
||||||
cli, err := saltyim.CreateOrLoadBotClient(identity, s.config.SvcUser)
|
cli, err := saltyim.CreateOrLoadClient(identity, s.config.SvcUser)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithError(err).Errorf("error creating or loading service user")
|
log.WithError(err).Errorf("error creating or loading service user")
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user