Skip to content

Commit

Permalink
update to new JSONRPC API
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Oct 27, 2023
1 parent bdfae9f commit 4172ea5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions deltachat/acfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,15 @@ func (self *AcFactory) WaitForEvent(rpc *Rpc, accId AccountId, event Event) Even
fmt.Printf("WARNING: Waiting for event in account %v, but got event for account %v, discarding event %#v.\n", accId, accId2, event)
continue
}
if self.Debug {
fmt.Printf("Waiting for event %v, got: %v\n", event.eventType(), ev.eventType())
}
if ev.eventType() == event.eventType() {
if self.Debug {
fmt.Printf("Got awaited event %v\n", ev.eventType())
}
return ev
}
if self.Debug {
fmt.Printf("Waiting for event %v, got: %v\n", event.eventType(), ev.eventType())
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions deltachat/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type _Event struct {
}

type _EventData struct {
Type eventType
Kind eventType
Msg string
File string
ChatId ChatId
Expand All @@ -61,7 +61,7 @@ type _EventData struct {

func (self *_EventData) ToEvent() Event {
var event Event
switch self.Type {
switch self.Kind {
case eventTypeInfo:
event = EventInfo{Msg: self.Msg}
case eventTypeSmtpConnected:
Expand Down

0 comments on commit 4172ea5

Please sign in to comment.