Update viber.py

Added the coalesce sqlite function to the sql statement, this function will return the first column included in it that does not contain a null value.
This commit is contained in:
Mark McKinnon 2020-03-02 11:08:29 -05:00
parent 8949600257
commit bd5f846d24

View File

@ -268,8 +268,8 @@ class ViberContactsParser(TskContactsParser):
def __init__(self, contact_db):
super(ViberContactsParser, self).__init__(contact_db.runQuery(
"""
SELECT C.display_name AS name,
D.data2 AS number
SELECT C.display_name AS name,
coalesce(D.data2, D.data1, D.data3) AS number
FROM phonebookcontact AS C
JOIN phonebookdata AS D
ON C._id = D.contact_id