Social Global
From Virtual World Web Wiki
- This is a JavaScript global object named Social
Remarks [edit]
Properties
- int FriendCount {get;}
- How many friends do we currently have?
- int IgnoredCount {get;}
- How many ignores do we currently have?
- int LocalCount {get;}
- How many avatars are in the current region?
- int RequestCount {get;}
- How many incoming requests do we currently have?
- JSAvatarSocialInfo Self {get;}
- Gets the AvatarSocialInfo for yourself
Events
- OnChannelAddUser(EventHandler<FlexibleEventArgs<JSChatChannel, JSAvatarSocialInfo>>)
- OnChannelFocus(EventHandler<FlexibleEventArgs<JSChatChannel>>)
- OnChannelJoin(EventHandler<FlexibleEventArgs<JSChatChannel>>)
- OnChannelLeave(EventHandler<FlexibleEventArgs<JSChatChannel>>)
- OnChannelReceivedMessage(EventHandler<FlexibleEventArgs<JSChatChannel, bool>>)
- Parameters:
- channel : The channel that received the message
- isBroadcast : Was the message a broadcast?
- Fires when chat channel receives a message
- Parameters:
- OnChannelRemoveUser(EventHandler<FlexibleEventArgs<JSChatChannel, JSAvatarSocialInfo>>)
- OnFriendAdded()
- Event fired when a new friend is added
- OnFriendChangedRegion()
- Event fired when a friend changes regions
- OnFriendInitial()
- Event fired when the server first delivers the friend list
- OnFriendOffline()
- Event fired when a friend goes offline
- OnFriendOnline()
- Event fired when a friend comes online
- OnFriendRemoved()
- Event fired when a friend is removed
- OnFriendRequestAdded()
- Event fired when an incoming friend request is first received
- OnFriendRequestRemoved()
- Event fired when an incoming friend request is resolved
- OnIgnoreAdded()
- Event fired when a new ignore is created
- OnIgnoreRemoved()
- Event fired when an ignore is removed
- OnLocalAdded()
- Event fired when someone joins your local region
- OnLocalRemoved()
- Event fired when someone leaves your local region
- OnLocalReset()
- Event fired when the local list is ready to be read after entering a new region
- OnLocalUpdated()
- Event fired when someone in your local region updates their profile information (e.g.: avatar thumbnail)
- OnUnhandledChatMessage(EventHandler<FlexibleEventArgs<JSChatChannel>>)
- Parameters:
- channel : The channel that is receiving the message
- Fires when a chat message was not received by any chat surface
- Parameters:
Methods
- bool ExecuteChat(string message, Guid? channelID = NULL)
- Sends a chat message to a given channel by ID (if no channelID is given, send to the local channel)
- JSAvatarSocialInfo GetAvatarInfo(Guid avatarID)
- Gets the AvatarSocialInfo for a given AvatarID
- JSChatChannel GetChannel(Guid? channelID = NULL)
- Gets the channel for a given ID. If no ID is given, returns the local channel
- IEnumerable<JSChatChannel> GetChannels()
- Gets an array of all channels
- string[] GetEvents()
- int GetFriendCountInInstance(Guid? instanceID = NULL)
- Returns the number of friends in a given instance by ID (or the local instance if no ID is given)
- IEnumerable<JSAvatarSocialInfo> GetFriends()
- Gets an array of AvatarSocialInfo's for all friends.
- IEnumerable<JSAvatarSocialInfo> GetFriendsInInstance(Guid? instanceID = NULL)
- An array of your friends in a given instance by ID (or the local instance if no ID is given)
- IEnumerable<JSAvatarSocialInfo> GetIgnored()
- Gets an array of AvatarSocialInfo's for all ignored users.
- IEnumerable<JSAvatarSocialInfo> GetLocal()
- Gets an array of AvatarSocialInfo's for all avatars in the local region.
- string GetMyName()
- Returns the name of your current persona
- IEnumerable<JSFriendRequestInfo> GetRequests()
- Gets an array of AvatarSocialInfo's for all incoming friend requests.