snapcap
API ReferenceVariables

FriendSource

Variable: FriendSource

const FriendSource: {
  ADDED_BY_ADDED_ME_BACK: 4;
  ADDED_BY_CHAT: 28;
  ADDED_BY_DEEP_LINK: 8;
  ADDED_BY_MENTION: 21;
  ADDED_BY_PHONE: 1;
  ADDED_BY_QR_CODE: 3;
  ADDED_BY_SEARCH: 32;
  ADDED_BY_SUBSCRIPTION: 22;
  ADDED_BY_UNKNOWN: 0;
  ADDED_BY_USERNAME: 2;
  ADDED_BY_WEB: 33;
  ADDED_FROM_PUBLIC_PROFILE: 26;
  ADDED_FROM_SPOTLIGHT: 25;
};

Defined in: api/friends/types.ts:37

Attribution source for IFriendsManager.sendRequest.

Mirrors the bundle's J$.source field on FriendActionParams (chat module 10409, offset ~1406050 in 9846a7958a5f0bee7197.js).

Type Declaration

NameTypeDefault valueDefined in
ADDED_BY_ADDED_ME_BACK44api/friends/types.ts:42
ADDED_BY_CHAT2828api/friends/types.ts:48
ADDED_BY_DEEP_LINK88api/friends/types.ts:43
ADDED_BY_MENTION2121api/friends/types.ts:44
ADDED_BY_PHONE11api/friends/types.ts:39
ADDED_BY_QR_CODE33api/friends/types.ts:41
ADDED_BY_SEARCH3232api/friends/types.ts:49
ADDED_BY_SUBSCRIPTION2222api/friends/types.ts:45
ADDED_BY_UNKNOWN00api/friends/types.ts:38
ADDED_BY_USERNAME22api/friends/types.ts:40
ADDED_BY_WEB3333api/friends/types.ts:50
ADDED_FROM_PUBLIC_PROFILE2626api/friends/types.ts:47
ADDED_FROM_SPOTLIGHT2525api/friends/types.ts:46

Remarks

Default for sendRequest() is ADDED_BY_USERNAME — what the SPA sends from the search-result "Add" button.

On this page