2026-10-24 18:31:01 +03:00
|
|
|
package meeting
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
|
|
// Vote values accepted by the meeting vote endpoint.
|
|
|
|
|
const (
|
|
|
|
|
VoteJoin = "join"
|
|
|
|
|
VoteDecline = "decline"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Meeting is a planned session that states when it will occur (ScheduledAt),
|
|
|
|
|
// what it is about (Title/Intent) and in which Jitsi room it takes place (Room).
|
|
|
|
|
type Meeting struct {
|
|
|
|
|
Id int64
|
|
|
|
|
Title string
|
|
|
|
|
Intent string
|
|
|
|
|
Room string
|
|
|
|
|
ScheduledAt time.Time
|
|
|
|
|
CreatedBy int64
|
|
|
|
|
CreatedAt time.Time
|
|
|
|
|
|
2026-10-25 10:01:20 +03:00
|
|
|
// HasNotification reports whether the meeting should be announced by
|
|
|
|
|
// notification consumers such as the Telegram bot. When false the meeting
|
|
|
|
|
// is created silently.
|
|
|
|
|
HasNotification bool
|
|
|
|
|
|
2026-10-24 18:31:01 +03:00
|
|
|
// Fields below are filled by the repository and are relative to the user
|
|
|
|
|
// requesting the meeting: the author's display name, the display names of
|
|
|
|
|
// the users who voted to join or not join, the resulting tallies and the
|
|
|
|
|
// requesting user's own vote (empty when the user has not voted).
|
|
|
|
|
CreatedByName string
|
|
|
|
|
Joiners []string
|
|
|
|
|
Decliners []string
|
|
|
|
|
JoinCount int
|
|
|
|
|
DeclineCount int
|
|
|
|
|
MyVote string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// IsValidVote reports whether value is an accepted vote.
|
|
|
|
|
func IsValidVote(value string) bool {
|
|
|
|
|
return value == VoteJoin || value == VoteDecline
|
|
|
|
|
}
|