OSDN Git Service
store contact id in messages table instead of the contact name string; merge messages and group messages table.
- merge group messages table with the messages table.
- replace the columns 'provider', 'account', 'contact' with 'thread_id' column in the messages table. The thread_id
column really contains the contact id for both messages and group messages.
- when querying for messages, use joined table b/t messages and contacts, so we can get the contact name with
the query. This is really for finding messages given a contact name, with the selection equal to
"contacts.account=? AND contacts.USERNAME=?".
- added uri "content://im/messagesByThreadId", "content://im/messagesByProvider", etc.
- reinstated the contact cleanup triggers to remove chats and messages. This was taken out because GTalkService
wipes out the old contacts and re-insert new roster result, causing the onging chats to be deleted. I changed
the way GTalkService updates contacts when getting a roster result on reconnect, and it's no longer destructive.