Plugin to automatically add a chatroom to users' contact lists

i would like to build a plugin for the following purpose in groupchat :

automatically add a chatroom/s to users’ contact lists much like Contact List (Roster) Sharing under user/groups>group>edit_group

I have attached a copy of what i think the final plugin should add.