forked from MirrorHub/mautrix-whatsapp
Fix the FindPrivateChats SELECT statement
The % needs to be escaped in the LIKE statement. Closes #532
This commit is contained in:
parent
465ffa27af
commit
17cd75654f
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ func (pq *PortalQuery) GetAllByJID(jid types.JID) []*Portal {
|
|||
}
|
||||
|
||||
func (pq *PortalQuery) FindPrivateChats(receiver types.JID) []*Portal {
|
||||
return pq.getAll(fmt.Sprintf("SELECT %s FROM portal WHERE receiver=$1 AND jid LIKE '%@s.whatsapp.net'", portalColumns), receiver.ToNonAD())
|
||||
return pq.getAll(fmt.Sprintf("SELECT %s FROM portal WHERE receiver=$1 AND jid LIKE '%%@s.whatsapp.net'", portalColumns), receiver.ToNonAD())
|
||||
}
|
||||
|
||||
func (pq *PortalQuery) FindPrivateChatsNotInSpace(receiver types.JID) (keys []PortalKey) {
|
||||
|
|
Loading…
Reference in a new issue