Use constant.Tag instead of AttributeTag
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2021-10-15 12:43:28 -07:00
parent ce8d728471
commit 8ecb105414
1 changed files with 2 additions and 4 deletions

View File

@ -5,6 +5,7 @@ import (
"cwtch.im/cwtch/event"
"cwtch.im/cwtch/model"
"cwtch.im/cwtch/model/attr"
"cwtch.im/cwtch/model/constants"
"cwtch.im/cwtch/peer"
"cwtch.im/cwtch/protocol/connections"
"cwtch.im/cwtch/storage"
@ -19,9 +20,6 @@ import (
"sync"
)
// AttributeTag is a const name for a peer attribute that can be set at creation time, for example for versioning info
const AttributeTag = "tag"
type applicationCore struct {
eventBuses map[string]event.Manager
@ -132,7 +130,7 @@ func (app *application) CreateTaggedPeer(name string, password string, tag strin
app.engines[profile.Onion] = engine
if tag != "" {
p.SetScopedZonedAttribute(attr.LocalScope, attr.ProfileZone, AttributeTag, tag)
p.SetScopedZonedAttribute(attr.LocalScope, attr.ProfileZone, constants.Tag, tag)
}
app.appBus.Publish(event.NewEvent(event.NewPeer, map[event.Field]string{event.Identity: profile.Onion, event.Created: event.True}))