From 80ee0ad38efa1a1ae464362747455b3ed120e01a Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Sat, 21 Jan 2023 16:55:08 +0530 Subject: [PATCH] add matrix & fedi to meta-info --- examples/meta-info.env | 2 ++ pages/users.go | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/examples/meta-info.env b/examples/meta-info.env index ce55597..cc3b0bd 100644 --- a/examples/meta-info.env +++ b/examples/meta-info.env @@ -3,4 +3,6 @@ GEMINI_CAPSULE=gemini://REPLACEME.p.projectsegfau.lt WEBSITE=https://REPLACEME.p.projectsegfau.lt DESCRIPTION="" EMAIL= +MATRIX= +FEDIVERSE= LOCATION= diff --git a/pages/users.go b/pages/users.go index 3a32cca..b29cb81 100644 --- a/pages/users.go +++ b/pages/users.go @@ -21,14 +21,16 @@ type Userstruct struct { } type Userinfo struct { - Name string `json:"name"` - FullName string `json:"fullName"` - Desc string `json:"desc"` - Online bool `json:"online"` - Email string `json:"email"` - Website string `json:"website"` - Capsule string `json:"capsule"` - Loc string `json:"loc"` + Name string `json:"name"` + FullName string `json:"fullName"` + Desc string `json:"desc"` + Online bool `json:"online"` + Email string `json:"email"` + Matrix string `json:"matrix"` + Fediverse string `json:"fediverse"` + Website string `json:"website"` + Capsule string `json:"capsule"` + Loc string `json:"loc"` } func userdata(username, usersonline string) Userinfo { @@ -61,6 +63,8 @@ func userdata(username, usersonline string) Userinfo { user.Website = viper.GetString("WEBSITE") user.Desc = viper.GetString("DESCRIPTION") user.Email = viper.GetString("EMAIL") + user.Matrix = viper.GetString("MATRIX") + user.Fediverse = viper.GetString("FEDIVERSE") user.Loc = viper.GetString("LOCATION") if isonline == true { user.Online = true