Skip to content

Commit

Permalink
Make missing channel name error non-fatal (#23925)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblum authored Apr 23, 2020
1 parent 6858d40 commit 64ff07f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go/chat/teamchannelsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func (c *TeamChannelSource) GetChannelTopicName(ctx context.Context, uid gregor1
return conv.TopicName, nil
}
}
return "", fmt.Errorf("no convs found with conv ID")
return "", fmt.Errorf("no convs found with convID")
}

func (c *TeamChannelSource) GetRecentJoins(ctx context.Context, convID chat1.ConversationID, remoteClient chat1.RemoteInterface) (res int, err error) {
Expand Down
9 changes: 7 additions & 2 deletions go/git/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,14 @@ func convertTeamRepoSettings(ctx context.Context, g *libkb.GlobalContext,
channelName, err := g.ChatHelper.GetChannelTopicName(ctx, teamID,
chat1.TopicType_CHAT, convID)
if err != nil {
return keybase1.GitTeamRepoSettings{}, err
// This error is non-fatal, show that chat is disabled and let
// the user chose something else.
settings.ChatDisabled = true
settings.ChannelName = nil
g.Log.CDebugf(ctx, "unable to get channel name: %v", err)
} else {
settings.ChannelName = &channelName
}
settings.ChannelName = &channelName
}
}

Expand Down

0 comments on commit 64ff07f

Please sign in to comment.