mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 09:00:10 +00:00
daemon: fix bug wiping out contact details
records were being left alone if "status == 200 && err != nil", instead of "... && err == nil". Sorry.
This commit is contained in:
parent
00e6da520d
commit
0a82f889f3
@ -10,7 +10,7 @@ func (app *appContext) clearEmails() {
|
|||||||
emails := app.storage.GetEmails()
|
emails := app.storage.GetEmails()
|
||||||
for _, email := range emails {
|
for _, email := range emails {
|
||||||
_, status, err := app.jf.UserByID(email.JellyfinID, false)
|
_, status, err := app.jf.UserByID(email.JellyfinID, false)
|
||||||
if status == 200 && err != nil {
|
if status == 200 && err == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
app.storage.DeleteEmailsKey(email.JellyfinID)
|
app.storage.DeleteEmailsKey(email.JellyfinID)
|
||||||
@ -23,7 +23,7 @@ func (app *appContext) clearDiscord() {
|
|||||||
discordUsers := app.storage.GetDiscord()
|
discordUsers := app.storage.GetDiscord()
|
||||||
for _, discordUser := range discordUsers {
|
for _, discordUser := range discordUsers {
|
||||||
_, status, err := app.jf.UserByID(discordUser.JellyfinID, false)
|
_, status, err := app.jf.UserByID(discordUser.JellyfinID, false)
|
||||||
if status == 200 && err != nil {
|
if status == 200 && err == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
app.storage.DeleteDiscordKey(discordUser.JellyfinID)
|
app.storage.DeleteDiscordKey(discordUser.JellyfinID)
|
||||||
@ -36,7 +36,7 @@ func (app *appContext) clearMatrix() {
|
|||||||
matrixUsers := app.storage.GetMatrix()
|
matrixUsers := app.storage.GetMatrix()
|
||||||
for _, matrixUser := range matrixUsers {
|
for _, matrixUser := range matrixUsers {
|
||||||
_, status, err := app.jf.UserByID(matrixUser.JellyfinID, false)
|
_, status, err := app.jf.UserByID(matrixUser.JellyfinID, false)
|
||||||
if status == 200 && err != nil {
|
if status == 200 && err == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
app.storage.DeleteMatrixKey(matrixUser.JellyfinID)
|
app.storage.DeleteMatrixKey(matrixUser.JellyfinID)
|
||||||
@ -49,7 +49,7 @@ func (app *appContext) clearTelegram() {
|
|||||||
telegramUsers := app.storage.GetTelegram()
|
telegramUsers := app.storage.GetTelegram()
|
||||||
for _, telegramUser := range telegramUsers {
|
for _, telegramUser := range telegramUsers {
|
||||||
_, status, err := app.jf.UserByID(telegramUser.JellyfinID, false)
|
_, status, err := app.jf.UserByID(telegramUser.JellyfinID, false)
|
||||||
if status == 200 && err != nil {
|
if status == 200 && err == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
app.storage.DeleteTelegramKey(telegramUser.JellyfinID)
|
app.storage.DeleteTelegramKey(telegramUser.JellyfinID)
|
||||||
|
Loading…
Reference in New Issue
Block a user