package event import ( zenaov1 "gno.land/p/zenao/zenao/v1" "gno.land/p/zenao/events" "gno.land/p/zenao/basedao" "gno.land/p/zenao/daokit" "gno.land/p/zenao/daocond" "gno.land/r/demo/profile" "gno.land/r/zenao/eventreg" "gno.land/r/zenao/social_feed" ) var ( DAO daokit.DAO localDAO daokit.DAO event *events.Event // XXX: needed for backward compatibility with frontend queries feedId string // XXX: workaround for "unexpected zero object id" issue ) func init() { // XXX: workaround for "unexpected zero object id" issue feedId = social_feed.NewFeed(cross, "main", false, feedAuth) } func init() { conf := events.Config{ Organizers: []string{"gno.land/r/zenao/users/u376"}, Gatekeepers: []string{}, Title: "Bibliothèque de Livres Vivants à la Médiathèque Alain Gérard de Quimper", Description: "Vous souhaitez écouter des témoignages de personnes concernées par un trouble psychique ? Devenez lecteur de livres vivants et luter contre la stigmatisation !\n\nRendez-vous le mercredi 15 octobre à la Bibliothèque universitaire des Lettres de Brest pour écouter les Livres Vivants qui partageront leurs tranches de vie.\n\nC'est Gratuit !\n\n- 💬 Bibliothèque de Livres Vivants\n- 📆 Samedi 18 octobre 2025, de 13h30 à 15h30.\n- 📍Médiathèque Alain Gérard Quimper", ImageURI: "ipfs://bafkreieqj4jm5azd3asyyh37372v34o6pekk2atiswt5krwuu42iorns5m", StartDate: 1760787000, EndDate: 1760794200, Capacity: 21, Discoverable: true, GetProfileString: profile.GetStringField, SetProfileString: profile.SetStringField, ZenaoAdminAddr: "g1djrkw9tf4px658j85cc6fhsvm50uf9s0g6kfsm", Location: &zenaov1.EventLocation{ Address: &zenaov1.AddressGeo{ Address: "Médiathèque Alain Gérard - 10 Esplanade François Mitterrand, 29000 Quimper, France", Lat: 47.99595, Lng: -4.1088495, }, }, ParticipationPubkey: "", CrossFn: crossFn, SetImplemFn: setImplem, FeedId: feedId, PrivateVarName: "event", } event = events.NewEvent(&conf) eventreg.Register(cross, func() *zenaov1.EventInfo { return event.Info() }) } func Vote(_ realm, proposalID uint64, vote daocond.Vote) { localDAO.Vote(proposalID, vote) } func Execute(_ realm, proposalID uint64) { localDAO.Execute(proposalID) } func Render(path string) string { return localDAO.Render(path) } func feedAuth() (string, bool) { caller := event.DAOPrivate.CallerID() // XXX: this should be upgradable return caller, basedao.MustGetMembersViewExtension(localDAO).IsMember(caller) } func crossFn(_ realm, cb func()) { cb() } func setImplem(newLocalDAO daokit.DAO, newDAO daokit.DAO) { localDAO, DAO = newLocalDAO, newDAO }