A 407:
Some magical staves might be usable as quarterstaves, and some might not, on a case-by-case basis decided by your DM. Even if it is not a quarterstaff, however, it can still be used as an improvised weapon, because anything handheld can be used as an improvised weapon, and it is probably similar enough to a quarterstaff to do quarterstaff damage. In such a case, nobody would be proficient with its use as a weapon unless they have the Tavern Brawler feat, but it is still a magical item, and so would bypass resistance or immunity to nonmagical weapons.