}
@Override
public void update(Observable o, Object arg) {
if (arg instanceof Message) {
Message p = (Message) arg;
// Send the post to the users in the channel
for (Integer peerId : channels.get(p.getChannel()).getUsers()) {
peers.get(peerId).send(p);
}
} else if (arg instanceof Control) {
handleControl((ClientHandler) o, (Control) arg);
}