Ejemplo n.º 1
0
 public static List <BubbleGroup> FindWithParticipantAddress(Service service, string participantAddress)
 {
     lock (BubbleGroupsLock)
     {
         return(BubbleGroups.Where(x => x.Service == service && x.IsParty &&
                                   x.Participants.FirstOrDefault(b => service.BubbleGroupComparer(participantAddress, b.Address)) != null).ToList());
     }
 }
Ejemplo n.º 2
0
        public static bool ResetSyncsIfHasAgent(Service service, string bubbleGroupAddress)
        {
            if (!SupportsSync(service))
            {
                return(false);
            }

            foreach (var group in BubbleGroupManager.FindAll(service))
            {
                if (service.BubbleGroupComparer(group.Address, bubbleGroupAddress))
                {
                    group.NeedsSync = true;
                    return(true);
                }
            }

            return(false);
        }