add matrix & fedi to meta-info

This commit is contained in:
Arya 2023-01-21 16:55:08 +05:30
parent 0474fa31fd
commit 80ee0ad38e
Signed by: arya
GPG Key ID: 842D12BDA50DF120
2 changed files with 14 additions and 8 deletions

View File

@ -3,4 +3,6 @@ GEMINI_CAPSULE=gemini://REPLACEME.p.projectsegfau.lt
WEBSITE=https://REPLACEME.p.projectsegfau.lt WEBSITE=https://REPLACEME.p.projectsegfau.lt
DESCRIPTION="" DESCRIPTION=""
EMAIL= EMAIL=
MATRIX=
FEDIVERSE=
LOCATION= LOCATION=

View File

@ -26,6 +26,8 @@ type Userinfo struct {
Desc string `json:"desc"` Desc string `json:"desc"`
Online bool `json:"online"` Online bool `json:"online"`
Email string `json:"email"` Email string `json:"email"`
Matrix string `json:"matrix"`
Fediverse string `json:"fediverse"`
Website string `json:"website"` Website string `json:"website"`
Capsule string `json:"capsule"` Capsule string `json:"capsule"`
Loc string `json:"loc"` Loc string `json:"loc"`
@ -61,6 +63,8 @@ func userdata(username, usersonline string) Userinfo {
user.Website = viper.GetString("WEBSITE") user.Website = viper.GetString("WEBSITE")
user.Desc = viper.GetString("DESCRIPTION") user.Desc = viper.GetString("DESCRIPTION")
user.Email = viper.GetString("EMAIL") user.Email = viper.GetString("EMAIL")
user.Matrix = viper.GetString("MATRIX")
user.Fediverse = viper.GetString("FEDIVERSE")
user.Loc = viper.GetString("LOCATION") user.Loc = viper.GetString("LOCATION")
if isonline == true { if isonline == true {
user.Online = true user.Online = true