Identify offline chat users, get delivery receipts and message history

Can I ask how you solve the problem?