-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIContactRepository.cs
More file actions
44 lines (37 loc) · 1.95 KB
/
Copy pathIContactRepository.cs
File metadata and controls
44 lines (37 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (C) 2024-2025 ZenonEl
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Эта программа является свободным программным обеспечением: вы можете распространять и/или изменять
// её на условиях Стандартной общественной лицензии GNU Affero, опубликованной
// Фондом свободного программного обеспечения, либо версии 3 лицензии, либо
// (по вашему выбору) любой более поздней версии.
namespace TelegramMediaRelayBot.Database.Interfaces;
public interface IContactAdder
{
void AddContact(long telegramID, string link);
bool MuteContact(int userId, int contactId, DateTime? mutedUntil = null);
}
public interface IContactRemover
{
bool UnmuteContact(int userId, int contactId);
bool RemoveContactByStatus(int senderTelegramID, int accepterTelegramID, string? status = null);
bool RemoveUsersFromContacts(int userId, List<int> contactIds);
bool RemoveAllContactsExcept(int userId, List<int> excludeIds);
bool RemoveAllContacts(int userId);
}
public interface IContactSetter
{
void SetContactStatus(long SenderTelegramID, long AccepterTelegramID, string status);
bool SetContactDisplayName(int userId, int contactId, string? displayName);
}
public interface IContactGetter
{
Task<List<long>> GetAllContactUserTGIds(int userId);
Task<List<int>> GetAllContactUserIds(int userId);
DateTime? GetMutedUntil(int userId, int contactId);
int GetContactIDByLink(string link);
int GetContactByTelegramID(long telegramID);
string? GetContactDisplayName(int userId, int contactId);
}