Allow multiple static peers in Pinecone iOS/Android demos

This commit is contained in:
Neil Alexander 2022-10-03 14:43:38 +01:00
parent 34451d21b8
commit ba66b5a3b9
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -126,7 +126,9 @@ func (m *DendriteMonolith) SetMulticastEnabled(enabled bool) {
func (m *DendriteMonolith) SetStaticPeer(uri string) { func (m *DendriteMonolith) SetStaticPeer(uri string) {
m.PineconeManager.RemovePeers() m.PineconeManager.RemovePeers()
for _, uri := range strings.Split(uri, ",") {
m.PineconeManager.AddPeer(strings.TrimSpace(uri)) m.PineconeManager.AddPeer(strings.TrimSpace(uri))
}
} }
func (m *DendriteMonolith) DisconnectType(peertype int) { func (m *DendriteMonolith) DisconnectType(peertype int) {