(store hub.Store, principal string)
| 129 | } |
| 130 | |
| 131 | func newLocalHubClient(store hub.Store, principal string) *localHubClient { |
| 132 | poll := defaultHubPollInterval |
| 133 | if v := os.Getenv("CHATCLI_HUB_POLL_MS"); v != "" { |
| 134 | if ms, err := strconv.Atoi(v); err == nil && ms > 0 { |
| 135 | poll = time.Duration(ms) * time.Millisecond |
| 136 | } |
| 137 | } |
| 138 | return &localHubClient{store: store, principal: principal, poll: poll} |
| 139 | } |
| 140 | |
| 141 | func (l *localHubClient) ResolveActiveConversation(ctx context.Context, principal string) (string, string, error) { |
| 142 | p := l.principalOr(principal) |
no outgoing calls