     
     let cos = realm.objects(ChannelObject.self).filter("team = %@", team!)
     if cos.count == 0 {
-       return
+      return
     }
     for c in cos {
       if c.id == channel {

        if json["user"] != nil {
          mo.user = json["user"] as! String
          mo.username = "system"

          let pkey = "\(team ?? "").\(mo.user)"
          if let existing = realm.object(ofType: UserObject.self,
                                         forPrimaryKey: pkey as AnyObject) {
            mo.username = existing.name
            
          }

        }
        
        mo.team = team!
        mo.id = "\(team ?? "").\(mo.channel).\(mo.ts)"

        let existing = realm.object(ofType: MessageObject.self, forPrimaryKey: mo.id as AnyObject)
        
        if (existing == nil) {

  
  func channelDidChange(notification: NSNotification) {
    _ = notification.object as! ButtonWithStringTag
    
  }
  
  func newTeamAdded(notification: NSNotification) {
