diff options
Diffstat (limited to 'protocols/FacebookRM/src/contacts.cpp')
-rw-r--r-- | protocols/FacebookRM/src/contacts.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index 276c4474ae..808bdef735 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -413,3 +413,24 @@ int FacebookProto::OnContactDeleted(WPARAM wParam,LPARAM) return 0; } + + +void FacebookProto::StartTyping(MCONTACT hContact) { + // ignore if contact is already typing + if (facy.typing.find(hContact) != facy.typing.end()) + return; + + // show notification and insert into typing set + CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)FACEBOOK_TYPING_TIME); + facy.typing.insert(hContact); +} + +void FacebookProto::StopTyping(MCONTACT hContact) { + // ignore if contact is not typing + if (facy.typing.find(hContact) == facy.typing.end()) + return; + + // show notification and remove from typing set + CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF); + facy.typing.erase(hContact); +}
\ No newline at end of file |