LeanCloud C# SDK
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
LeanCloud.Realtime.LCIMConversation Class Reference

LCIMConversation is a local representation of general conversation in LeanCloud. More...

Inheritance diagram for LeanCloud.Realtime.LCIMConversation:
LeanCloud.Realtime.LCIMChatRoom LeanCloud.Realtime.LCIMServiceConversation LeanCloud.Realtime.LCIMTemporaryConversation

Public Member Functions

async Task< int > GetMembersCount ()
 The count of members of this conversation.
 
virtual async Task Read ()
 Mark the last message of this conversation as read.
 
async Task UpdateInfo (Dictionary< string, object > attributes)
 Update attributes of this conversation.
 
virtual async Task< LCIMPartiallySuccessResultAddMembers (IEnumerable< string > clientIds)
 Adds members to this conversation.
 
async Task< LCIMPartiallySuccessResultRemoveMembers (IEnumerable< string > removeIds)
 Removes members from this conversation.
 
async Task Join ()
 Joins this conversation.
 
async Task Quit ()
 Leaves this conversation.
 
async Task< LCIMMessageSend (LCIMMessage message, LCIMMessageSendOptions options=null)
 Sends a message in this conversation.
 
async Task Mute ()
 Turns off the offline notifications of this conversation.
 
async Task Unmute ()
 Turns on the offline notifications of this conversation.
 
async Task< LCIMPartiallySuccessResultMuteMembers (IEnumerable< string > clientIds)
 Mutes members of this conversation.
 
async Task< LCIMPartiallySuccessResultUnmuteMembers (IEnumerable< string > clientIds)
 Unmutes members of this conversation.
 
async Task< LCIMPartiallySuccessResultBlockMembers (IEnumerable< string > clientIds)
 Adds members to the blocklist of this conversation.
 
async Task< LCIMPartiallySuccessResultUnblockMembers (IEnumerable< string > clientIds)
 Removes members from the blocklist of this conversation.
 
async Task RecallMessage (LCIMMessage message)
 Recalls a sent message.
 
async Task UpdateMessage (LCIMMessage oldMessage, LCIMMessage newMessage)
 Updates a sent message.
 
async Task UpdateMemberRole (string memberId, string role)
 Updates the role of a member of this conversation.
 
async Task< ReadOnlyCollection< LCIMConversationMemberInfo > > GetAllMemberInfo ()
 Gets all member roles.
 
async Task< LCIMConversationMemberInfoGetMemberInfo (string memberId)
 Gets the role of a specific member.
 
async Task< LCIMPageResultQueryMutedMembers (int limit=10, string next=null)
 Queries muted members.
 
async Task< LCIMPageResultQueryBlockedMembers (int limit=10, string next=null)
 Queries blocked members.
 
async Task< ReadOnlyCollection< LCIMMessage > > QueryMessages (LCIMMessageQueryEndpoint start=null, LCIMMessageQueryEndpoint end=null, LCIMMessageQueryDirection direction=LCIMMessageQueryDirection.NewToOld, int limit=20, int messageType=0)
 Retrieves messages.
 
virtual async Task FetchReciptTimestamps ()
 Fetches receipt timestamp.
 
async Task< LCIMConversationFetch ()
 Fetch conversation from server.
 

Properties

string Id [get, set]
 The ID of this conversation.
 
bool Unique [get, set]
 Indicates whether this conversation is normal and unique. The uniqueness is based on the members when creating.
 
string UniqueId [get, set]
 If this conversation is unique, then it will have a unique ID.
 
string Name [get, set]
 The name of this conversation.
 
string CreatorId [get, set]
 The creator of this conversation.
 
ReadOnlyCollection< string > MemberIds [get]
 The members of this conversation.
 
ReadOnlyCollection< string > MutedMemberIds [get]
 Muted members of this conversation.
 
int Unread [get, set]
 The count of the unread messages.
 
LCIMMessage LastMessage [get, set]
 The last message in this conversation.
 
DateTime CreatedAt [get, set]
 The created date of this conversation.
 
DateTime UpdatedAt [get, set]
 The last updated date of this conversation.
 
DateTime LastMessageAt [get, set]
 The date of the last message.
 
long LastDeliveredTimestamp [get, set]
 The last timestamp of the delivered message.
 
DateTime LastDeliveredAt [get]
 The last date of the delivered message.
 
long LastReadTimestamp [get, set]
 The last timestamp of the message which has been read by other clients.
 
DateTime LastReadAt [get]
 The last date of the message which has been read by other clients.
 
object this[string key] [get, set]
 Custom attributes.
 
bool IsMute [get]
 Indicates whether offline notifications about this conversation has been muted.
 
LCIMClient Client [get]
 

Detailed Description

LCIMConversation is a local representation of general conversation in LeanCloud.

Member Function Documentation

◆ AddMembers()

virtual async Task< LCIMPartiallySuccessResult > LeanCloud.Realtime.LCIMConversation.AddMembers ( IEnumerable< string >  clientIds)
inlinevirtual

Adds members to this conversation.

Parameters
clientIdsMember list.
Returns

Reimplemented in LeanCloud.Realtime.LCIMChatRoom.

◆ BlockMembers()

async Task< LCIMPartiallySuccessResult > LeanCloud.Realtime.LCIMConversation.BlockMembers ( IEnumerable< string >  clientIds)
inline

Adds members to the blocklist of this conversation.

Parameters
clientIdsMember list.
Returns

◆ Fetch()

async Task< LCIMConversation > LeanCloud.Realtime.LCIMConversation.Fetch ( )
inline

Fetch conversation from server.

Returns

◆ FetchReciptTimestamps()

virtual async Task LeanCloud.Realtime.LCIMConversation.FetchReciptTimestamps ( )
inlinevirtual

Fetches receipt timestamp.

Returns

Reimplemented in LeanCloud.Realtime.LCIMChatRoom, and LeanCloud.Realtime.LCIMServiceConversation.

◆ GetAllMemberInfo()

async Task< ReadOnlyCollection< LCIMConversationMemberInfo > > LeanCloud.Realtime.LCIMConversation.GetAllMemberInfo ( )
inline

Gets all member roles.

Returns

◆ GetMemberInfo()

async Task< LCIMConversationMemberInfo > LeanCloud.Realtime.LCIMConversation.GetMemberInfo ( string  memberId)
inline

Gets the role of a specific member.

Parameters
memberIdThe member to query.
Returns

◆ GetMembersCount()

async Task< int > LeanCloud.Realtime.LCIMConversation.GetMembersCount ( )
inline

The count of members of this conversation.

Returns

◆ Join()

async Task LeanCloud.Realtime.LCIMConversation.Join ( )
inline

Joins this conversation.

Returns

◆ Mute()

async Task LeanCloud.Realtime.LCIMConversation.Mute ( )
inline

Turns off the offline notifications of this conversation.

Returns

◆ MuteMembers()

async Task< LCIMPartiallySuccessResult > LeanCloud.Realtime.LCIMConversation.MuteMembers ( IEnumerable< string >  clientIds)
inline

Mutes members of this conversation.

Parameters
clientIdsMember list.
Returns

◆ QueryBlockedMembers()

async Task< LCIMPageResult > LeanCloud.Realtime.LCIMConversation.QueryBlockedMembers ( int  limit = 10,
string  next = null 
)
inline

Queries blocked members.

Parameters
limitLimits the number of returned results.
nextCan be used for pagination with the limit parameter.
Returns

◆ QueryMessages()

async Task< ReadOnlyCollection< LCIMMessage > > LeanCloud.Realtime.LCIMConversation.QueryMessages ( LCIMMessageQueryEndpoint  start = null,
LCIMMessageQueryEndpoint  end = null,
LCIMMessageQueryDirection  direction = LCIMMessageQueryDirection::NewToOld,
int  limit = 20,
int  messageType = 0 
)
inline

Retrieves messages.

Parameters
startStart message ID.
endEnd message ID.
directionQuery direction (defaults to NewToOld).
limitLimits the number of returned results. Its default value is 100.
messageTypeThe message type to query. The default value is 0 (text message).
Returns

◆ QueryMutedMembers()

async Task< LCIMPageResult > LeanCloud.Realtime.LCIMConversation.QueryMutedMembers ( int  limit = 10,
string  next = null 
)
inline

Queries muted members.

Parameters
limitLimits the number of returned results.
nextCan be used for pagination with the limit parameter.
Returns

◆ Quit()

async Task LeanCloud.Realtime.LCIMConversation.Quit ( )
inline

Leaves this conversation.

Returns

◆ Read()

virtual async Task LeanCloud.Realtime.LCIMConversation.Read ( )
inlinevirtual

Mark the last message of this conversation as read.

Returns

Reimplemented in LeanCloud.Realtime.LCIMChatRoom.

◆ RecallMessage()

async Task LeanCloud.Realtime.LCIMConversation.RecallMessage ( LCIMMessage  message)
inline

Recalls a sent message.

Parameters
messageThe message to recall.
Returns

◆ RemoveMembers()

async Task< LCIMPartiallySuccessResult > LeanCloud.Realtime.LCIMConversation.RemoveMembers ( IEnumerable< string >  removeIds)
inline

Removes members from this conversation.

Parameters
removeIdsMember list.
Returns

◆ Send()

async Task< LCIMMessage > LeanCloud.Realtime.LCIMConversation.Send ( LCIMMessage  message,
LCIMMessageSendOptions  options = null 
)
inline

Sends a message in this conversation.

Parameters
messageThe message to send.
optionsThe options of sending message.
Returns

◆ UnblockMembers()

async Task< LCIMPartiallySuccessResult > LeanCloud.Realtime.LCIMConversation.UnblockMembers ( IEnumerable< string >  clientIds)
inline

Removes members from the blocklist of this conversation.

Parameters
clientIdsMember list.
Returns

◆ Unmute()

async Task LeanCloud.Realtime.LCIMConversation.Unmute ( )
inline

Turns on the offline notifications of this conversation.

Returns

◆ UnmuteMembers()

async Task< LCIMPartiallySuccessResult > LeanCloud.Realtime.LCIMConversation.UnmuteMembers ( IEnumerable< string >  clientIds)
inline

Unmutes members of this conversation.

Parameters
clientIdListMember list.
Returns

◆ UpdateInfo()

async Task LeanCloud.Realtime.LCIMConversation.UpdateInfo ( Dictionary< string, object >  attributes)
inline

Update attributes of this conversation.

Parameters
attributesAttributes to update.
Returns

◆ UpdateMemberRole()

async Task LeanCloud.Realtime.LCIMConversation.UpdateMemberRole ( string  memberId,
string  role 
)
inline

Updates the role of a member of this conversation.

Parameters
memberIdThe member to update.
roleThe new role of the member.
Returns

◆ UpdateMessage()

async Task LeanCloud.Realtime.LCIMConversation.UpdateMessage ( LCIMMessage  oldMessage,
LCIMMessage  newMessage 
)
inline

Updates a sent message.

Parameters
oldMessageThe message to update.
newMessageThe updated message.
Returns

Property Documentation

◆ Client

LCIMClient LeanCloud.Realtime.LCIMConversation.Client
getprotected

◆ CreatedAt

DateTime LeanCloud.Realtime.LCIMConversation.CreatedAt
getset

The created date of this conversation.

◆ CreatorId

string LeanCloud.Realtime.LCIMConversation.CreatorId
getset

The creator of this conversation.

◆ Id

string LeanCloud.Realtime.LCIMConversation.Id
getset

The ID of this conversation.

◆ IsMute

bool LeanCloud.Realtime.LCIMConversation.IsMute
get

Indicates whether offline notifications about this conversation has been muted.

◆ LastDeliveredAt

DateTime LeanCloud.Realtime.LCIMConversation.LastDeliveredAt
get

The last date of the delivered message.

◆ LastDeliveredTimestamp

long LeanCloud.Realtime.LCIMConversation.LastDeliveredTimestamp
getset

The last timestamp of the delivered message.

◆ LastMessage

LCIMMessage LeanCloud.Realtime.LCIMConversation.LastMessage
getset

The last message in this conversation.

◆ LastMessageAt

DateTime LeanCloud.Realtime.LCIMConversation.LastMessageAt
getset

The date of the last message.

◆ LastReadAt

DateTime LeanCloud.Realtime.LCIMConversation.LastReadAt
get

The last date of the message which has been read by other clients.

◆ LastReadTimestamp

long LeanCloud.Realtime.LCIMConversation.LastReadTimestamp
getset

The last timestamp of the message which has been read by other clients.

◆ MemberIds

ReadOnlyCollection<string> LeanCloud.Realtime.LCIMConversation.MemberIds
get

The members of this conversation.

◆ MutedMemberIds

ReadOnlyCollection<string> LeanCloud.Realtime.LCIMConversation.MutedMemberIds
get

Muted members of this conversation.

◆ Name

string LeanCloud.Realtime.LCIMConversation.Name
getset

The name of this conversation.

◆ this[string key]

object LeanCloud.Realtime.LCIMConversation.this[string key]
getset

Custom attributes.

Parameters
keyCustom attribute name.
Returns

◆ Unique

bool LeanCloud.Realtime.LCIMConversation.Unique
getset

Indicates whether this conversation is normal and unique. The uniqueness is based on the members when creating.

◆ UniqueId

string LeanCloud.Realtime.LCIMConversation.UniqueId
getset

If this conversation is unique, then it will have a unique ID.

◆ Unread

int LeanCloud.Realtime.LCIMConversation.Unread
getset

The count of the unread messages.

◆ UpdatedAt

DateTime LeanCloud.Realtime.LCIMConversation.UpdatedAt
getset

The last updated date of this conversation.


The documentation for this class was generated from the following file: