This does the actual work of updating channel metadata.  This is called
		by the update(), and runs this method in another thread.

def _update_deferred(self, event):
		"""
		This does the actual work of updating channel metadata.  This is called
		by the update(), and runs this method in another thread.
		"""
		if isinstance(event, ChannelCreated):
			i = event.channel[u'id']
			event.channel[u'is_archived'] = event.channel[u'is_member'] = False

			self.channels[i] = event.channel
		elif isinstance(event, ChannelArchive):
			self.channels[event.channel][u'is_archived'] = True
		elif isinstance(event, GroupArchive):
			self.groups[event.channel][u'is_archived'] = True
		elif isinstance(event, ChannelDeleted):
			# FIXME: Handle delete events properly.
			# Channels don't really get deleted, they're more just archived.
			self.channels[event.channel][u'is_archived'] = True
			self.channels[event.channel][u'is_open'] = False
		elif isinstance(event, GroupClose):
			# When you close a group, it isn't open to you anymore, but it might
			# still exist. Treat it like ChannelDeleted
			self.groups[event.channel][u'is_archived'] = True
			self.groups[event.channel][u'is_open'] = False
		elif isinstance(event, ChannelJoined):
			cid = event.channel[u'id']
			self.channels[cid] = event.channel
		elif isinstance(event, GroupJoined):
			gid = event.channel[u'id']
			self.groups[gid] = event.channel
		elif isinstance(event, ChannelLeft):
			self.channels[event.channel][u'is_member'] = False
		elif isinstance(event, GroupLeft):
			self.groups[event.channel][u'is_member'] = False
		elif isinstance(event, ChannelMarked):
			# TODO: implement datetime handler properly
			self.channels[event.channel][u'last_read'] = event._b[u'ts']
		elif isinstance(event, GroupMarked):
			self.groups[event.channel][u'last_read'] = event._b[u'ts']
		elif isinstance(event, ChannelRename):
			self.channels[event.channel[u'id']][u'name'] = event.channel[u'name']
		elif isinstance(event, GroupRename):
			self.groups[event.channel[u'id']][u'name'] = event.channel[u'name']
		elif isinstance(event, ChannelUnarchive):
			self.channels[event.channel][u'is_archived'] = False
		elif isinstance(event, GroupUnarchive):
			self.groups[event.channel][u'is_archived'] = False
		elif isinstance(event, ImClose):
			self.ims[event.channel][u'is_open'] = False
		elif isinstance(event, ImCreated):
			i = event.channel[u'id']
			event.channel[u'user'] = event.user

			self.ims[i] = event.channel
		elif isinstance(event, ImMarked):
			# TODO: implement datetime handler properly
			self.ims[event.channel][u'last_read'] = event._b[u'ts']
		elif isinstance(event, ImOpen):
			self.ims[event.channel][u'is_open'] = True
		elif isinstance(event, PresenceChange):
			self.users[event.user][u'presence'] = event.presence
		elif isinstance(event, UserChange):
			# Everything but the status is provided
			# Copy this out of the existing object

			uid = event.user[u'id']

			if event.user.get(u'status') is None and u'presence' in self.users[uid]:
				event.user[u'status'] = self.users[uid][u'presence']

			self.users[uid] = event.user
		elif isinstance(event, TeamPrefChange):
			self.team[u'prefs'][event.name] = event.value
		elif isinstance(event, TeamJoin):
			uid = event.user[u'id']
			self.users[uid] = event.user
		elif isinstance(event, BotAdded) or isinstance(event, BotChanged):
			bid = event.bot[u'id']
			self.bots[bid] = event.bot