How to trigger some actions

Hello everyone.

I am writing a small chat module and I want to trigger some actions and I don't know how to do.

I want to run some functions everytime the following actions will be performed.

  1. When "Add Friend" request is sent.
  2. When "Removed friend" request is sent.
  3. When "Friend request" is Approved or Declined.
  4. When "Edit avatar" is performed.

My chat client is written in javascript and should be executed during login process because it needs user login and user passord.

I dont know which functions or views I should used.

I need your help

Best regard.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking