Add WhatsApp->Matrix read receipts and phone connection notifications

This commit is contained in:
Tulir Asokan
2018-08-24 19:46:14 +03:00
parent 60529bf022
commit 1f87deb317
12 changed files with 178 additions and 69 deletions

View File

@ -59,7 +59,7 @@ func (mq *MessageQuery) GetAll(owner types.MatrixUserID) (messages []*Message) {
}
func (mq *MessageQuery) GetByJID(owner types.MatrixUserID, jid types.WhatsAppMessageID) *Message {
return mq.get("SELECT * FROM message WHERE jid=?", jid)
return mq.get("SELECT * FROM message WHERE owner=? AND jid=?", owner, jid)
}
func (mq *MessageQuery) GetByMXID(mxid types.MatrixEventID) *Message {