unwrap eventprofileenvelope

This commit is contained in:
erinn 2021-03-16 15:05:44 -07:00
parent b61094f5d4
commit 6e4547c8bb
1 changed files with 7 additions and 1 deletions

View File

@ -246,10 +246,16 @@ func (eh *EventHandler) handleProfileEvent(ev *EventProfileEnvelope) string {
*/
}
json, _ := json.Marshal(ev)
json, _ := json.Marshal(downgrade(ev))
return string(json)
}
func downgrade(original *EventProfileEnvelope) *event.Event {
unwrapped := &original.Event
unwrapped.Data["ProfileOnion"] = original.Profile
return unwrapped
}
func (eh *EventHandler) startHandlingPeer(onion string) {
eventBus := eh.app.GetEventBus(onion)
q := event.NewQueue()