1
0
mirror of https://github.com/zedeus/nitter.git synced 2026-05-03 19:12:20 -04:00

Add full support for tweet edit history

Fixes #700
This commit is contained in:
Zed
2026-02-16 00:52:17 +01:00
parent f257ce53ae
commit a15d1ce16b
13 changed files with 194 additions and 60 deletions

View File

@@ -165,13 +165,17 @@ proc getDuration*(video: Video): string =
else:
return &"{min mod 60}:{sec mod 60:02}"
proc getLink*(id: int64; username="i"; focus=true): string =
var username = username
if username.len == 0:
username = "i"
result = &"/{username}/status/{id}"
if focus: result &= "#m"
proc getLink*(tweet: Tweet; focus=true): string =
if tweet.id == 0: return
var username = tweet.user.username
if username.len == 0:
username = "i"
result = &"/{username}/status/{tweet.id}"
if focus: result &= "#m"
return getLink(tweet.id, username, focus)
proc getTwitterLink*(path: string; params: Table[string, string]): string =
var