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()); } }
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); }