Merge pull request 'initialize message count' (#15) from rinnmar17 into trunk
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Reviewed-on: #15
This commit is contained in:
commit
e1d4eed7ac
|
@ -7,4 +7,6 @@ type Contact struct {
|
|||
Picture string `json:"picture"`
|
||||
Authorization string `json:"authorization"`
|
||||
SaveHistory string `json:"saveConversationHistory"`
|
||||
Messages int `json:"numMessages"`
|
||||
Unread int `json:"numUnread"`
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
|||
if !set {
|
||||
saveHistory = event.DeleteHistoryDefault
|
||||
}
|
||||
contacts = append(contacts, Contact{Name: name, Onion: contactInfo.Onion, Status: contactInfo.State, Picture: cpicPath, Authorization: string(contactInfo.Authorization), SaveHistory: saveHistory})
|
||||
contacts = append(contacts, Contact{Name: name, Onion: contactInfo.Onion, Status: contactInfo.State, Picture: cpicPath, Authorization: string(contactInfo.Authorization), SaveHistory: saveHistory, Messages: contactInfo.Timeline.Len(), Unread: 0,})
|
||||
}
|
||||
|
||||
bytes, _ := json.Marshal(contacts)
|
||||
|
|
Loading…
Reference in New Issue