mirror of
https://github.com/zedeus/nitter.git
synced 2024-06-10 09:09:21 +00:00
Add a check to prevent following someone twice
This commit is contained in:
parent
76e05a1bfb
commit
69d4aaa803
|
@ -8,6 +8,8 @@ proc addUserToFollowing*(following, toAdd: string): string =
|
|||
var updated = following.split(",")
|
||||
if updated == @[""]:
|
||||
return toAdd
|
||||
elif toAdd in updated:
|
||||
return following
|
||||
else:
|
||||
updated = concat(updated, @[toAdd])
|
||||
result = updated.join(",")
|
||||
|
|
Loading…
Reference in a new issue