fix server description; fix serverInfo to have identifier; add themeMode to settings; cwtch bump
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
28a13aaca9
commit
d2abed7583
|
@ -8,7 +8,6 @@ import (
|
||||||
"cwtch.im/cwtch/protocol/connections"
|
"cwtch.im/cwtch/protocol/connections"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.openprivacy.ca/cwtch.im/libcwtch-go/constants"
|
"git.openprivacy.ca/cwtch.im/libcwtch-go/constants"
|
||||||
"git.openprivacy.ca/cwtch.im/libcwtch-go/features/servers"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const groupExperiment = "tapir-groups-experiment"
|
const groupExperiment = "tapir-groups-experiment"
|
||||||
|
@ -57,6 +56,6 @@ func (gf *GroupFunctionality) GetServerInfo(serverOnion string, profile peer.Cwt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
description, _ := serverInfo.GetAttribute(attr.LocalScope, servers.ServerZone, constants.Description)
|
description, _ := serverInfo.GetAttribute(attr.LocalScope, attr.ServerZone, constants.Description)
|
||||||
return Server{Onion: serverOnion, Status: connections.ConnectionStateName[profile.GetPeerState(serverInfo.Handle)], Keys: serverKeys, Description: description}
|
return Server{Onion: serverOnion, Identifier: serverInfo.ID, Status: connections.ConnectionStateName[profile.GetPeerState(serverInfo.Handle)], Keys: serverKeys, Description: description}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ type ServerKey struct {
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
Onion string `json:"onion"`
|
Onion string `json:"onion"`
|
||||||
|
Identifier int `json:"identifier"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
Keys []ServerKey `json:"keys"`
|
Keys []ServerKey `json:"keys"`
|
||||||
|
|
|
@ -2,7 +2,6 @@ package servers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"cwtch.im/cwtch/event"
|
"cwtch.im/cwtch/event"
|
||||||
"cwtch.im/cwtch/model/attr"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.openprivacy.ca/cwtch.im/server"
|
"git.openprivacy.ca/cwtch.im/server"
|
||||||
"git.openprivacy.ca/openprivacy/connectivity"
|
"git.openprivacy.ca/openprivacy/connectivity"
|
||||||
|
@ -36,7 +35,6 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: move into Cwtch model/attr
|
// TODO: move into Cwtch model/attr
|
||||||
const ServerZone = attr.Zone("server")
|
|
||||||
|
|
||||||
type ServerInfo struct {
|
type ServerInfo struct {
|
||||||
Onion string
|
Onion string
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -3,7 +3,7 @@ module git.openprivacy.ca/cwtch.im/libcwtch-go
|
||||||
go 1.15
|
go 1.15
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cwtch.im/cwtch v0.14.2
|
cwtch.im/cwtch v0.14.3
|
||||||
git.openprivacy.ca/cwtch.im/server v1.4.1
|
git.openprivacy.ca/cwtch.im/server v1.4.1
|
||||||
git.openprivacy.ca/openprivacy/connectivity v1.5.0
|
git.openprivacy.ca/openprivacy/connectivity v1.5.0
|
||||||
git.openprivacy.ca/openprivacy/log v1.0.3
|
git.openprivacy.ca/openprivacy/log v1.0.3
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -13,6 +13,8 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy
|
||||||
cwtch.im/cwtch v0.14.1/go.mod h1:/fLuoYLY/7JHw6RojFojpd245CiOcU24QpWqzh9FRDI=
|
cwtch.im/cwtch v0.14.1/go.mod h1:/fLuoYLY/7JHw6RojFojpd245CiOcU24QpWqzh9FRDI=
|
||||||
cwtch.im/cwtch v0.14.2 h1:Q9rUainxUcHB2+F46lxhIS5kwZLy9BhPoQI1WnKcOD4=
|
cwtch.im/cwtch v0.14.2 h1:Q9rUainxUcHB2+F46lxhIS5kwZLy9BhPoQI1WnKcOD4=
|
||||||
cwtch.im/cwtch v0.14.2/go.mod h1:/fLuoYLY/7JHw6RojFojpd245CiOcU24QpWqzh9FRDI=
|
cwtch.im/cwtch v0.14.2/go.mod h1:/fLuoYLY/7JHw6RojFojpd245CiOcU24QpWqzh9FRDI=
|
||||||
|
cwtch.im/cwtch v0.14.3 h1:CKNBYGfKErtLDY3fUOyadTVNbI2JjOe+Ud/srydVAko=
|
||||||
|
cwtch.im/cwtch v0.14.3/go.mod h1:/fLuoYLY/7JHw6RojFojpd245CiOcU24QpWqzh9FRDI=
|
||||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||||
filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU=
|
filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU=
|
||||||
filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
|
filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
|
||||||
|
|
|
@ -27,6 +27,7 @@ const saltFile = "SALT"
|
||||||
type GlobalSettings struct {
|
type GlobalSettings struct {
|
||||||
Locale string
|
Locale string
|
||||||
Theme string
|
Theme string
|
||||||
|
ThemeMode string
|
||||||
PreviousPid int64
|
PreviousPid int64
|
||||||
ExperimentsEnabled bool
|
ExperimentsEnabled bool
|
||||||
Experiments map[string]bool
|
Experiments map[string]bool
|
||||||
|
|
Reference in New Issue