Add new meetings feature
This commit is contained in:
1 parent
d09c63b88c
commit
db6a333029
14 files changed
+1251
-8
No files matched your search
@@ -0,0 +1,37 @@
|
||||
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
|
||||
|
||||
// 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
|
||||
}
|
||||
Reference in new issue
Block a user