forked from MapComplete/MastodonBot
Fetch changeset info from OSM api to detect all images (workaround for https://github.com/mapbox/osmcha-frontend/issues/641); send a direct message to bot owner when running; improve usernames of image authors
This commit is contained in:
parent
70a7224160
commit
e7e2d8609f
7 changed files with 131 additions and 56 deletions
|
@ -39,6 +39,17 @@ export default class OsmUserInfo {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public async GetMastodonLink(): Promise<string | undefined> {
|
||||
const mastodonLinks = await this.getMeLinks()
|
||||
|
||||
if (mastodonLinks.length <= 0) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const url = new URL(mastodonLinks[0])
|
||||
return url.pathname.substring(1) + "@" + url.host
|
||||
}
|
||||
|
||||
public async getMeLinks(): Promise<string[]> {
|
||||
const userdata = await this.getUserInfo()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue