@@ 264,10 264,21 @@ func RoomTUI(kill <-chan error, client *mautrix.Client, room *election.Room, ele
if err != nil {
return
}
+
err = el.JoinElection(client, electionsMap.EventStore)
if err != nil {
return
}
+
+ body := fmt.Sprintf("Let's vote on:\n\n%s\n\n", title)
+ for _, candidate := range candidates {
+ body += fmt.Sprintf("- %s\n", candidate)
+ }
+ body += fmt.Sprintf("\n see tallyard.xyz for joining instructions")
+ _, err = client.SendMessageEvent(room.ID, event.EventMessage, event.MessageEventContent{
+ MsgType: event.MsgNotice,
+ Body: body,
+ })
})
app.SetRoot(list, true)