Improvements

This commit is contained in:
Pieter Vander Vennet 2023-01-20 00:51:48 +01:00
parent 5aa1413078
commit 5801c53038
3 changed files with 7 additions and 4 deletions

2
.nvmrc
View file

@ -1 +1 @@
v16.17.1 v18.13.0

View file

@ -74,8 +74,11 @@ export default class OsmUserInfo {
if(await mastodonApi.hasNoBot(username)){ if(await mastodonApi.hasNoBot(username)){
return undefined return undefined
} }
const useraccount = await mastodonApi.userInfoFor(username) let useraccount = (await mastodonApi.userInfoFor(username)).acct
return useraccount.acct if(!useraccount.startsWith("@")){
useraccount = "@"+useraccount
}
return useraccount
} }
public async getMeLinks(): Promise<string[]> { public async getMeLinks(): Promise<string[]> {

View file

@ -274,7 +274,7 @@ export class Postbuilder {
} }
const singleTheme = this._config?.themeWhitelist?.length === 1 ? "/" + this._config.themeWhitelist[0] : "" const singleTheme = this._config?.themeWhitelist?.length === 1 ? "/" + this._config.themeWhitelist[0] : ""
let toSend: string[] = [ let toSend: string[] = [
`${timePeriod}, ${perContributor.keys().length} persons made ${totalStats.total} changes to #OpenStreetMap using https://mapcomplete.osm.be${singleTheme} . `${timePeriod}, ${perContributor.keys().length} people made ${totalStats.total} changes to #OpenStreetMap using https://mapcomplete.osm.be${singleTheme} .
`, `,
] ]