More complete ChannelState transfer on connect.

This commit is contained in:
Mikkel Krautz 2011-04-11 18:35:15 +02:00
parent 32b13b48da
commit c3be7e6b4f

View file

@ -541,6 +541,18 @@ func (client *Client) sendChannelTree(channel *Channel) {
}
}
if channel.Temporary {
chanstate.Temporary = proto.Bool(true)
}
chanstate.Position = proto.Int32(int32(channel.Position))
links := []uint32{}
for cid, _ := range channel.Links {
links = append(links, uint32(cid))
}
chanstate.Links = links
err := client.sendProtoMessage(MessageChannelState, chanstate)
if err != nil {
client.Panic(err.String())