Screenshot of code (detail) in Helix Editor on macOS, showing the source for app_modules/database/database.js. The following code is highlighted with a pink border:
initialise () {
// Migration.
if (this.account !== undefined) {
this.data = this.account
delete this.account
}
}
Full listing
texport class VerifiedAccount extends Model {
url = this.url || ''
/**
This is the object returned from the accounts/lookup
method of the Mastodon API.
See: https://docs.joinmastodon.org/methods/accounts/#lookup
@type {{
id: string,
username: string,
acct: string,
display_name: string,
locked: boolean,
bot: boolean,
discoverable: boolean,
indexable:boolean,
group:boolean,
created_at: string,
note:string,
url: string,
uri: string
avatar:string
avatar_static: string,
header: string,
header_static: string,
followers_count: number,
following_count: number,
statuses_count: number,
last_status_at: string,
hide_collections: boolean,
noindex: boolean,
emojis: Array,
roles: Array,
fields: Array
}}
*/
data = this.data || ''
initialise () {
// Migration.
if (this.account !== undefined) {
this.data = this.account
delete this.account
}
}
/**
The account is the bit of the URL from the @ onwards.
*/