forked from MapComplete/MastodonBot
Improvements
This commit is contained in:
parent
5aa1413078
commit
5801c53038
3 changed files with 7 additions and 4 deletions
2
.nvmrc
2
.nvmrc
|
@ -1 +1 @@
|
||||||
v16.17.1
|
v18.13.0
|
||||||
|
|
|
@ -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[]> {
|
||||||
|
|
|
@ -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} .
|
||||||
`,
|
`,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue