@@ 13,6 13,7 @@ import (
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/event"
"maunium.net/go/mautrix/id"
+ "tallyard.xyz"
"tallyard.xyz/election"
"tallyard.xyz/math"
@@ 204,7 205,7 @@ func debugEventHook(_ mautrix.EventSource, evt *event.Event) {
}
func setDeviceName(client *mautrix.Client, deviceID id.DeviceID) {
- displayName := fmt.Sprintf("tallyard %s", election.Version)
+ displayName := fmt.Sprintf("tallyard %s", tallyard.Version)
hostname, err := os.Hostname()
if err == nil {
log.Debugf("hostname: %s", hostname)
@@ 15,6 15,7 @@ import (
"golang.org/x/crypto/nacl/box"
"maunium.net/go/mautrix/event"
"maunium.net/go/mautrix/id"
+ "tallyard.xyz"
"tallyard.xyz/math"
)
@@ 58,7 59,7 @@ func randomLocalVoter(t *testing.T) *LocalVoter {
RoomID: "room1",
Content: event.Content{
Parsed: JoinElectionContent{
- Version: Version,
+ Version: tallyard.Version,
CreateID: "createID",
Input: base64.StdEncoding.EncodeToString(inputBytes[:]),
PubKey: base64.StdEncoding.EncodeToString((*pubKey)[:]),
@@ 18,6 18,7 @@ import (
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/event"
"maunium.net/go/mautrix/id"
+ "tallyard.xyz"
"tallyard.xyz/math"
)
@@ 223,7 224,7 @@ func logFuncs(baseFormat string) (error, warn, debug logfFunc) {
func incompatibleVersion(version string) bool {
return semver.Compare(
semver.MajorMinor(version),
- semver.MajorMinor(Version),
+ semver.MajorMinor(tallyard.Version),
) != 0
}
@@ 15,6 15,7 @@ import (
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/event"
"maunium.net/go/mautrix/id"
+ "tallyard.xyz"
"tallyard.xyz/math"
)
@@ 64,7 65,7 @@ func NewLocalVoter(voter *Voter, privKey *[32]byte) *LocalVoter {
func (elections *ElectionsMap) CreateElection(client *mautrix.Client, candidates []Candidate, title string, roomID id.RoomID) (*Election, error) {
resp, err := client.SendMessageEvent(roomID, CreateElectionMessage, CreateElectionContent{
- Version: Version,
+ Version: tallyard.Version,
Candidates: candidates,
Title: title,
})
@@ 98,7 99,7 @@ func (el *Election) JoinElection(client *mautrix.Client, eventStore *EventStore)
}
resp, err := client.SendMessageEvent(el.RoomID, JoinElectionMessage, JoinElectionContent{
- Version: Version,
+ Version: tallyard.Version,
CreateID: el.CreateEvt.ID,
Input: base64.StdEncoding.EncodeToString(inputBytes[:]),
@@ 148,7 149,7 @@ func (el *Election) StartElection(client *mautrix.Client, eventStore *EventStore
}
resp, err := client.SendMessageEvent(el.RoomID, StartElectionMessage, StartElectionContent{
- Version: Version,
+ Version: tallyard.Version,
CreateID: el.CreateEvt.ID,
JoinIDs: voters,
})
@@ 225,7 226,7 @@ func (el *Election) SendProvingKeys(client *mautrix.Client, eventStore *EventSto
}
resp, err := client.SendMessageEvent(el.RoomID, KeysMessage, KeysMessageContent{
- Version: Version,
+ Version: tallyard.Version,
EvalProvingKeyURI: evalProvingKeyURI,
JoinID: el.LocalVoter.JoinEvt.ID,
@@ 311,7 312,7 @@ func (el *Election) SendEvals(client *mautrix.Client, eventStore *EventStore) er
}
resp, err := client.SendMessageEvent(el.RoomID, EvalsMessage, EvalsMessageContent{
- Version: Version,
+ Version: tallyard.Version,
Evals: evals,
JoinID: el.LocalVoter.JoinEvt.ID,
@@ 398,7 399,7 @@ func (el *Election) SendSum(client *mautrix.Client, eventStore *EventStore) erro
sumBytes := el.LocalVoter.Sum.Bytes()
resp, err := client.SendMessageEvent(el.RoomID, SumMessage, SumMessageContent{
- Version: Version,
+ Version: tallyard.Version,
EvalsIDs: evalsIDs,
JoinID: el.LocalVoter.JoinEvt.ID,