// logoutUserFromAllChats forcefully logouts user from all chats.
// It uses locks, beware of it.
// It is used in NotifyDB to logout users on LogoutEvent

logoutUserFromAllChats forcefully logouts user from all chats.
It uses locks, beware of it.
It is used in NotifyDB to logout users on LogoutEvent
// logoutUserFromAllChats forcefully logouts user from all chats . // It uses locks beware of it . // It is used in NotifyDB to logout users on LogoutEvent
func logoutUserFromAllChats(username string, chatDB db.ChatDB) {
	chats := chatDB.GetChats()
	for _, chat := range chats {
		chatDB.RemoveUser(chat, username)
	}
}
func logoutUserFromAllChats ( username string , chatDB db . ChatDB ) { chats := chatDB . GetChats ( ) for _ , chat := range chats { chatDB . RemoveUser ( chat , username ) } }
logoutUserFromAllChats forcefully logouts user from all chats.
logoutUserFromAllChats forcefully logouts user from all chats .