add group message popup notifications

This commit is contained in:
erinn 2021-06-16 16:45:15 -07:00
parent eb4150c0be
commit 28011ae674
2 changed files with 7 additions and 5 deletions

6
lib.go
View File

@ -1,6 +1,6 @@
//package cwtch
package cwtch
package main
//package main
import "C"
import (
@ -739,4 +739,4 @@ func ShutdownCwtch() {
}
// Leave as is, needed by ffi
func main() {}
//func main() {}

View File

@ -236,11 +236,13 @@ func (eh *EventHandler) handleProfileEvent(ev *EventProfileEnvelope) string {
}*/
case event.NewMessageFromPeer: //event.TimestampReceived, event.RemotePeer, event.Data
fallthrough
case event.NewMessageFromGroup:
// only needs contact nickname and picture, for displaying on popup notifications
ev.Event.Data["Nick"] = ph.GetNick(ev.Event.Data["RemotePeer"])
ev.Event.Data["Picture"] = ph.GetProfilePic(ev.Event.Data["RemotePeer"])
case event.NewMessageFromGroup:
// only needs contact nickname and picture, for displaying on popup notifications
ev.Event.Data["Nick"] = ph.GetNick(ev.Event.Data[event.GroupID])
ev.Event.Data["Picture"] = ph.GetProfilePic(ev.Event.Data[event.GroupID])
case event.PeerAcknowledgement:
// No enrichement required
case event.PeerCreated: