improve tests saveMessage

This commit is contained in:
grimhilt
2023-03-30 09:16:10 +02:00
parent 1a63b3154a
commit e2bd0bafea
3 changed files with 215 additions and 214 deletions

View File

@@ -46,14 +46,14 @@ class registerMessageInApp {
}
async init() {
this.ownerId = await getAddresseId(createAddress(this.envelope.sender[0])); // todo use sender or from ?
this.ownerId = await getAddresseId(createAddress(this.envelope.from[0])); // todo use sender or from ?
}
isDm = () => nbMembers(this.envelope) == 2;
async isFromUs() {
if (!this.userId) this.userId = (await getUserIdOfMailbox(boxId))[0]?.user_id;
return this.ownerId = this.userId;
if (!this.userId) this.userId = (await getUserIdOfMailbox(this.boxId))[0]?.user_id;
return this.ownerId == this.userId;
}
async initiateRoom(owner, roomType) {