NewPeer enrichment of conversations: group use groupServer state
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
f1d2e6a310
commit
f2067348ec
|
@ -180,8 +180,13 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
||||||
isArchived = event.False
|
isArchived = event.False
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolve Peer State (should probably be DISCONNECTED)
|
groupServer, _ := conversationInfo.GetAttribute(attr.LocalScope, attr.LegacyGroupZone, constants.GroupServer)
|
||||||
state := profile.GetPeerState(conversationInfo.Handle)
|
|
||||||
|
stateHandle := conversationInfo.Handle
|
||||||
|
if conversationInfo.IsGroup() {
|
||||||
|
stateHandle = groupServer
|
||||||
|
}
|
||||||
|
state := profile.GetPeerState(stateHandle)
|
||||||
if !set {
|
if !set {
|
||||||
state = connections.DISCONNECTED
|
state = connections.DISCONNECTED
|
||||||
}
|
}
|
||||||
|
@ -191,9 +196,6 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
||||||
blocked = true
|
blocked = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we are a server...
|
|
||||||
groupServer, _ := conversationInfo.GetAttribute(attr.LocalScope, attr.LegacyGroupZone, constants.GroupServer)
|
|
||||||
|
|
||||||
// Fetch the message count, and the time of the most recent message
|
// Fetch the message count, and the time of the most recent message
|
||||||
count, err := profile.GetChannelMessageCount(conversationInfo.ID, 0)
|
count, err := profile.GetChannelMessageCount(conversationInfo.ID, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Reference in New Issue