private void deleteMessage(Message msg, int position) {
String removekey = msg.getId();
ref.child("message").child(removekey).removeValue();
messagesList.remove(position);
Adapterclass adapterclass = new Adapterclass(ChatActivity.this, messagesList);
listView.setAdapter(adapterclass);
}