u
Anirudh Oppiliappan x@icyphox.sh
Sat, 16 Mar 2024 08:44:31 +0200
1 files changed,
56 insertions(+),
11 deletions(-)
jump to
M
masto.go
→
masto.go
@@ -246,6 +246,51 @@
return } +// /// The ID of the account. +// public let id: String +// /// The username of the account. +// public let username: String +// /// Equals username for local users, includes @domain for remote ones. +// public let acct: String +// /// The account's display name. +// public let displayName: String +// /// Biography of user. +// public let note: String +// /// URL of the user's profile page (can be remote). +// public let url: String +// /// URL to the avatar image. +// public let avatar: String +// /// URL to the avatar static image +// public let avatarStatic: String +// /// URL to the header image. +// public let header: String +// /// URL to the header static image +// public let headerStatic: String +// /// Boolean for when the account cannot be followed without waiting for approval first. +// public let locked: Bool +// /// The time the account was created. +// public let createdAt: String? +// /// The number of followers for the account. +// public var followersCount: Int +// /// The number of accounts the given account is following. +// public var followingCount: Int +// /// The number of statuses the account has made. +// public let statusesCount: Int +// /// An array of Emoji. +// public let emojis: [Emoji] +// +// public let fields: [HashType] +// +// /// A 3-5 word description of the account +// /// Optional, as this is a Mammoth addition +// public let summary: String? +// +// public let bot: Bool +// public let lastStatusAt: String? +// public let discoverable: Bool? +// +// public let source: AccountSource? + // https://docs.joinmastodon.org/methods/accounts/#verify_credentials func verifycreds(rw http.ResponseWriter, r *http.Request) { user, ok := somenumberedusers.Get(UserID(1))@@ -254,26 +299,26 @@ elog.Fatalf("masto: no user number 1???")
} j := junk.New() j["id"] = fmt.Sprintf("%d", user.ID) - j["created_at"] = "2016-11-24T10:02:12.085Z" // gonna paste this from mastodocs j["username"] = user.Name + j["created_at"] = "" j["acct"] = user.Name j["display_name"] = user.Options.CustomDisplay j["url"] = user.URL - j["note"] = user.HTAbout + j["note"] = user.About j["avatar"] = user.Options.Avatar + j["avatar_static"] = user.Options.Avatar j["header"] = user.Options.Banner + j["header_static"] = user.Options.Banner j["followers_count"] = 0 j["following_count"] = 0 j["statuses_count"] = getlocalhonkcount() - j["fields"] = []interface{}{} - - s := junk.New() - s["note"] = user.About - s["privacy"] = "public" - s["note"] = user.About - s["fields"] = []interface{}{} - s["emojis"] = []interface{}{} - j["source"] = s + j["locked"] = false + j["bot"] = false + j["last_status_at"] = "" + j["discoverable"] = false + j["source"] = nil + j["emojis"] = []junk.Junk{} + j["fields"] = []junk.Junk{} log.Println(j.ToString())