update messages paging for conduit.rs, which in turn doesnt work but thats future work

master
Bel LaPointe 2022-01-13 16:46:10 -05:00
parent 1cdb399dda
commit 9552df9281
2 changed files with 4 additions and 5 deletions

View File

@ -22,8 +22,7 @@
},
"Clients": {
"bel": {
"States": [
],
"States": [],
"IDs": {
"Matrix": "@bel:m.bltrucks.top"
},
@ -57,7 +56,7 @@
"Matrix": {
"ReceiveEnabled": true,
"Mock": false,
"Continuation": "",
"Continuation": "190",
"Homeserver": "https://m.bltrucks.top",
"Username": "@bot.m.bltrucks.top",
"Token": "mvDWB96KXMF8XhOam8EC5XVdQvSEw0CDeClcSWocBcYkwZX3FPNWZ5uOnQk2EmT1cjpzfeuD7gDYPPjOuyZlI3bE9TE35UjNOlZgi0Tugm25s91iVsbIF6kMZsCIhVMSmEf6w3jxX6wQYOWvmDZ4mu6f5c8wr221EMDcOpEzQV09d1zuBSWgKLBgjqAkYHJZ5dTRIWpEDpPgujhOFZa2ld1HiAOxrJKlIrlfDBN0CUsTlGOGplujDAr4VtpFzNRS",

View File

@ -71,12 +71,12 @@ func (m *Matrix) Receive() ([]Message, error) {
return nil, err
}
messages := make([]Message, 0)
result, err := c.Messages(m.room, "", m.continuation, 'b', 50)
result, err := c.Messages(m.room, "999999999999999999", m.continuation, 'b', 50)
if err != nil {
return nil, err
}
log.Printf("%s => {Start:%s End:%v};; %v, (%d)", m.continuation, result.Start, result.End, err, len(result.Chunk))
m.continuation = result.Start
m.continuation = result.End
for _, event := range result.Chunk {
//log.Printf("%+v", event)
if _, ok := matrixIDs[event.Sender]; !ok {