Merge pull request 'Save Peer History Settings' (#14) from peersettings into trunk
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Reviewed-on: #14
This commit is contained in:
commit
cf23b04f2d
|
@ -6,4 +6,5 @@ type Contact struct {
|
|||
Status string `json:"status"`
|
||||
Picture string `json:"picture"`
|
||||
Authorization string `json:"authorization"`
|
||||
SaveHistory string `json:"saveConversationHistory"`
|
||||
}
|
||||
|
|
|
@ -107,7 +107,11 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
|||
cpicPath := GetPicturePath(cpic)
|
||||
contactInfo := profile.GetContact(contact)
|
||||
name, _ := contactInfo.GetAttribute(attr.GetLocalScope(constants.Name))
|
||||
contacts = append(contacts, Contact{Name: name, Onion: contactInfo.Onion, Status: contactInfo.State, Picture: cpicPath, Authorization: string(contactInfo.Authorization)})
|
||||
saveHistory, set := contactInfo.GetAttribute(event.SaveHistoryKey)
|
||||
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})
|
||||
}
|
||||
|
||||
bytes, _ := json.Marshal(contacts)
|
||||
|
|
Loading…
Reference in New Issue