More code

This commit is contained in:
Tulir Asokan
2017-11-21 00:09:39 +02:00
parent 217017099a
commit 5ef0a202a2
9 changed files with 145 additions and 116 deletions
+5 -6
View File
@@ -48,7 +48,10 @@ class TelegramUser {
}
toPeer(telegramPOV) {
return new TelegramPeer("user", this.id, this.accessHashes.get(telegramPOV.userID))
return new TelegramPeer("user", this.id, {
accessHash: this.accessHashes.get(telegramPOV.userID),
receiverID: telegramPOV.userID,
})
}
toEntry() {
@@ -67,7 +70,7 @@ class TelegramUser {
}
}
async updateInfo(telegramPOV, user, { updateAvatar }) {
async updateInfo(telegramPOV, user, { updateAvatar } = {}) {
let changed = false
if (this.firstName !== user.first_name) {
this.firstName = user.first_name
@@ -141,10 +144,6 @@ class TelegramUser {
})
}
sendSelfStateEvent(roomID, type, content) {
return this.intent.sendStateEvent(roomID, type, this.getMxid(), content)
}
uploadContent(opts) {
return this.intent.getClient()
.uploadContent({