Don't join channels the user has left
This commit is contained in:
+3
-1
@@ -186,6 +186,7 @@ class MatrixUser {
|
|||||||
let changed = false
|
let changed = false
|
||||||
|
|
||||||
for (const user of dialogs.users) {
|
for (const user of dialogs.users) {
|
||||||
|
this.app.debug("cyan", "Syncing data for", this.telegramPuppet.userID, JSON.stringify(user, "", " "))
|
||||||
if (!user.self) {
|
if (!user.self) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -209,9 +210,10 @@ class MatrixUser {
|
|||||||
|
|
||||||
this.chats = []
|
this.chats = []
|
||||||
for (const dialog of dialogs.chats) {
|
for (const dialog of dialogs.chats) {
|
||||||
if (dialog._ === "chatForbidden" || dialog._ === "channelForbidden" || dialog.deactivated) {
|
if (dialog._ === "chatForbidden" || dialog._ === "channelForbidden" || dialog.deactivated || dialog.left) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
this.app.debug("cyan", "Syncing data for ", this.telegramPuppet.userID, JSON.stringify(dialog, "", " "))
|
||||||
const peer = new TelegramPeer(dialog._, dialog.id, {
|
const peer = new TelegramPeer(dialog._, dialog.id, {
|
||||||
accessHash: dialog.access_hash,
|
accessHash: dialog.access_hash,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user