1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-05-26 12:32:25 +00:00

Rework subscribing to deleted channels

This commit is contained in:
Cadence Ember 2022-01-10 14:18:45 +13:00
parent 15e3f06ad6
commit 109dcd22de
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
12 changed files with 167 additions and 22 deletions

View file

@ -54,7 +54,7 @@ class User {
getSubscriptions() {
if (this.token) {
return db.prepare("SELECT ucid FROM Subscriptions WHERE token = ? AND channel_missing = 0").pluck().all(this.token)
return db.prepare("SELECT ucid FROM Subscriptions WHERE token = ?").pluck().all(this.token)
} else {
return []
}
@ -62,7 +62,7 @@ class User {
isSubscribed(ucid) {
if (this.token) {
return !!db.prepare("SELECT * FROM Subscriptions WHERE token = ? AND ucid = ? AND channel_missing = 0").get([this.token, ucid])
return !!db.prepare("SELECT * FROM Subscriptions WHERE token = ? AND ucid = ?").get([this.token, ucid])
} else {
return false
}