Changeset 285 in code


Ignore:
Timestamp:
May 1, 2020, 3:39:53 PM (5 years ago)
Author:
contact
Message:

Don't clear channel key on JOIN

Closes: https://todo.sr.ht/~emersion/soju/50

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r284 r285  
    956956
    957957                        ch := &Channel{Name: upstreamName, Key: key, Detached: false}
     958                        if current, ok := uc.network.channels[ch.Name]; ok && key == "" {
     959                                // Don't clear the channel key if there's one set
     960                                // TODO: add a way to unset the channel key
     961                                ch.Key = current.Key
     962                        }
    958963                        if err := uc.network.createUpdateChannel(ch); err != nil {
    959964                                dc.logger.Printf("failed to create or update channel %q: %v", upstreamName, err)
Note: See TracChangeset for help on using the changeset viewer.