Recv: handle clientIQ: more terse code

This commit is contained in:
Philip Silva 2016-01-14 16:40:46 +01:00
parent c84fc9afab
commit adbceb5dae

View File

@ -594,13 +594,7 @@ func (c *Client) Recv() (stanza interface{}, err error) {
case *clientPresence: case *clientPresence:
return Presence{v.From, v.To, v.Type, v.Show, v.Status}, nil return Presence{v.From, v.To, v.Type, v.Show, v.Status}, nil
case *clientIQ: case *clientIQ:
result := IQ{ return IQ{v.ID, v.From, v.To, v.Type}, nil
ID: v.ID,
From: v.From,
To: v.To,
Type: v.Type,
}
return result, nil
} }
} }
} }