mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 05:42:46 +00:00
Bind build support, further Yggdrasil demo updates (#1152)
* Add gobind builds for Yggdrasil demo * Massage client API a bit * Fix build * Fix gobind build * Fix gobind client API setup * Tweaks * Tweaks * Update sytest-whitelist, add comment * Default to sending push rules on initial sync
This commit is contained in:
parent
72444e4a4f
commit
7f26b0cd13
15 changed files with 336 additions and 65 deletions
|
@ -98,6 +98,9 @@ func (t *StreamingToken) PDUPosition() StreamPosition {
|
|||
func (t *StreamingToken) EDUPosition() StreamPosition {
|
||||
return t.Positions[1]
|
||||
}
|
||||
func (t *StreamingToken) String() string {
|
||||
return t.syncToken.String()
|
||||
}
|
||||
|
||||
// IsAfter returns true if ANY position in this token is greater than `other`.
|
||||
func (t *StreamingToken) IsAfter(other StreamingToken) bool {
|
||||
|
@ -220,8 +223,8 @@ func NewTopologyTokenFromString(tok string) (token TopologyToken, err error) {
|
|||
err = fmt.Errorf("token %s is not a topology token", tok)
|
||||
return
|
||||
}
|
||||
if len(t.Positions) != 2 {
|
||||
err = fmt.Errorf("token %s wrong number of values, got %d want 2", tok, len(t.Positions))
|
||||
if len(t.Positions) < 2 {
|
||||
err = fmt.Errorf("token %s wrong number of values, got %d want at least 2", tok, len(t.Positions))
|
||||
return
|
||||
}
|
||||
return TopologyToken{
|
||||
|
@ -247,8 +250,8 @@ func NewStreamTokenFromString(tok string) (token StreamingToken, err error) {
|
|||
err = fmt.Errorf("token %s is not a streaming token", tok)
|
||||
return
|
||||
}
|
||||
if len(t.Positions) != 2 {
|
||||
err = fmt.Errorf("token %s wrong number of values, got %d want 2", tok, len(t.Positions))
|
||||
if len(t.Positions) < 2 {
|
||||
err = fmt.Errorf("token %s wrong number of values, got %d want at least 2", tok, len(t.Positions))
|
||||
return
|
||||
}
|
||||
return StreamingToken{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue