diff options
Diffstat (limited to 'protocols/Telegram/src/proto.cpp')
-rw-r--r-- | protocols/Telegram/src/proto.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index b270c760d7..07cba42bc9 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -334,8 +334,10 @@ int CTelegramProto::AuthRequest(MCONTACT hContact, const wchar_t *) return 0; } -INT_PTR CTelegramProto::GetCaps(int type, MCONTACT) +INT_PTR CTelegramProto::GetCaps(int type, MCONTACT hContact) { + uint32_t ret; + switch (type) { case PFLAGNUM_1: return PF1_IM | PF1_FILE | PF1_CHAT | PF1_SEARCHBYNAME | PF1_ADDSEARCHRES | PF1_MODEMSGRECV | PF1_SERVERCLIST; @@ -344,9 +346,12 @@ INT_PTR CTelegramProto::GetCaps(int type, MCONTACT) return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY; case PFLAGNUM_4: - return PF4_NOCUSTOMAUTH | PF4_FORCEAUTH | PF4_OFFLINEFILES | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_AVATARS - | PF4_SERVERMSGID | PF4_DELETEFORALL | PF4_REPLY | PF4_GROUPCHATFILES; - + ret = PF4_NOCUSTOMAUTH | PF4_FORCEAUTH | PF4_OFFLINEFILES | PF4_NOAUTHDENYREASON | PF4_SUPPORTTYPING | PF4_AVATARS + | PF4_SERVERMSGID | PF4_REPLY | PF4_GROUPCHATFILES; + if (GetId(hContact) != m_iOwnId) + ret |= PF4_DELETEFORALL; + return ret; + case PFLAGNUM_5: return PF2_SHORTAWAY | PF2_LONGAWAY; |