Send channel messages as AS bot if sender is unknown

This commit is contained in:
Tulir Asokan
2017-11-30 21:38:55 +02:00
parent eaff8204b8
commit 56ab82cabd
4 changed files with 24 additions and 9 deletions
+3 -2
View File
@@ -305,9 +305,11 @@ class TelegramPuppet {
from = update.from_id
break
case "updateNewChannelMessage":
// TODO figure out how channel message signing works
from = -1
case "updateNewMessage":
update = update.message // Message defined at message#90dddc11 in layer 71
from = update.from_id
from = update.from_id || from
to = TelegramPeer.fromTelegramData(update.to_id, update.from_id, this.userID)
break
@@ -317,7 +319,6 @@ class TelegramPuppet {
return
}
console.log(update)
portal = await this.app.getPortalByPeer(to)
if (update._ === "messageService") {