(source: string)
| 284 | } |
| 285 | |
| 286 | function convertTweetSource(source: string): Record<string, string> | null { |
| 287 | const match = /<a href="(.+)" rel="nofollow">(.+)<\/a>/.exec(source); |
| 288 | if (match) { |
| 289 | return { name: match[2], website: match[1] }; |
| 290 | } else { |
| 291 | return null; |
| 292 | } |
| 293 | } |
| 294 | |
| 295 | export function tweetToToot(tweet: Record<string, any>, globalObjects?: any): Record<string, any> { |
| 296 | const toot: Record<string, any> = {}; |