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
DESCRIPTION=""
EMAIL=
MATRIX=
FEDIVERSE=
LOCATION=

View File

@ -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