 
     item._id                 = data.id
     item.isParticipant       = channel.isParticipant
-    # we only allow name, purpose and payload to be updated  
+    # we only allow name, purpose and payload to be updated
     item.payload             = data.payload
     item.name                = data.name
     item.purpose             = data.purpose

    item.participantsPreview = mapAccounts channel.participantsPreview
    item.unreadCount         = channel.unreadCount
    item.lastMessage         = mapActivity channel.lastMessage  if channel.lastMessage
        
    unless cacheFound 
      channelInstance = new remote.api.SocialChannel item
    else 
      channelInstance = item

    kd.singletons.socialapi.cacheItem channelInstance


    # item is initially our data
    item = data

    # if we find the channel in cache, replace item with it
    if cacheItem = socialapi.retrieveCachedItem item.typeConstant, item.id
      cacheFound = yes
