Add option to update m.direct with double puppeting
This commit is contained in:
1 parent
b1c947da99
commit
2638204eaa
11 files changed
+87
-12
No files matched your search
@@ -84,6 +84,10 @@ func (pq *PortalQuery) GetAllByJID(jid types.WhatsAppID) []*Portal {
|
||||
return pq.getAll("SELECT * FROM portal WHERE jid=$1", jid)
|
||||
}
|
||||
|
||||
func (pq *PortalQuery) FindPrivateChats(receiver types.WhatsAppID) []*Portal {
|
||||
return pq.getAll("SELECT * FROM portal WHERE receiver=$1 AND jid LIKE '%@s.whatsapp.net'", receiver)
|
||||
}
|
||||
|
||||
func (pq *PortalQuery) getAll(query string, args ...interface{}) (portals []*Portal) {
|
||||
rows, err := pq.db.Query(query, args...)
|
||||
if err != nil || rows == nil {
|
||||
|
||||
Reference in new issue
Block a user