Use length variable, Comment deprecation of GetOnion
This commit is contained in:
parent
ead6a2698f
commit
c62ecd6f71
|
@ -143,10 +143,10 @@ func (g *Group) GetMessage(index int) (bool, Message, int) {
|
||||||
|
|
||||||
length := len(g.Timeline.Messages)
|
length := len(g.Timeline.Messages)
|
||||||
|
|
||||||
if len(g.Timeline.Messages) > index {
|
if length > index {
|
||||||
return true, g.Timeline.Messages[index], length
|
return true, g.Timeline.Messages[index], length
|
||||||
}
|
}
|
||||||
return false, Message{}, len(g.Timeline.Messages)
|
return false, Message{}, length
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddMessage takes a DecryptedGroupMessage and adds it to the Groups Timeline
|
// AddMessage takes a DecryptedGroupMessage and adds it to the Groups Timeline
|
||||||
|
|
|
@ -249,6 +249,9 @@ type CwtchPeer interface {
|
||||||
StartServerConnections()
|
StartServerConnections()
|
||||||
Shutdown()
|
Shutdown()
|
||||||
|
|
||||||
|
// GetOnion is deprecated. If you find yourself needing to rely on this method it is time
|
||||||
|
// to consider replacing this with a GetAddress(es) function that can fully expand cwtch beyond the boundaries
|
||||||
|
// of tor v3 onion services.
|
||||||
// Deprecated
|
// Deprecated
|
||||||
GetOnion() string
|
GetOnion() string
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue