ChatGraphQlMixin mixin

Chat related functionality.

Mixin applications

Properties

client GraphQlClient
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addChatMember(ChatId chatId, UserId userId) Future<ChatEventsVersionedMixin?>
Adds an User to a Chat-group by the authority of the authenticated MyUser.
attachments(ChatItemId id) Future<GetAttachments$Query>
Returns the Attachments of a ChatItem identified by the provided id.
avatar(ChatId id) Future<GetAvatar$Query>
Fetches the ChatAvatars of a Chat identified by the provided id.
chatEvents(ChatId id, ChatVersion? ver, FutureOr<ChatVersion?> onVer()) Stream<QueryResult<Object?>>
Subscribes to ChatEvents of the specified Chat.
chatItem(ChatItemId id) Future<GetMessage$Query>
Returns a ChatItem by its ID.
chatItems(ChatId id, {int? first, ChatItemsCursor? after, int? last, ChatItemsCursor? before, ChatItemsFilter? filter}) Future<GetMessages$Query>
Fetches ChatItems of a Chat identified by its id ordered by their posting time.
chatMembers(ChatId id, {int? first, ChatMembersCursor? after, int? last, ChatMembersCursor? before}) Future<GetMembers$Query>
Fetches ChatMembers of a Chat identified by its id ordered by their joining time.
clearChat(ChatId id, ChatItemId untilId) Future<ChatEventsVersionedMixin?>
Clears an existing Chat (hides all its ChatItems) for the authenticated MyUser until the specified ChatItem inclusively.
Creates a new ChatDirectLink with the specified ChatDirectLinkSlug and deletes the current active ChatDirectLink of the given Chat-group.
createDialogChat(UserId responderId) Future<ChatMixin>
Creates a Chat-dialog with the provided responderId for the authenticated MyUser.
createGroupChat(List<UserId> memberIds, {ChatName? name}) Future<ChatMixin>
Creates a Chat-group with the provided Users as members and the authenticated MyUser.
createMonologChat({ChatName? name, bool? isHidden}) Future<ChatMixin>
Creates a Chat-monolog for the authenticated MyUser.
Deletes the current ChatDirectLink of the given Chat-group.
deleteChatForward(ChatItemId id) Future<ChatEventsVersionedMixin?>
Deletes the specified ChatForward posted by the authenticated MyUser.
deleteChatMessage(ChatItemId id) Future<ChatEventsVersionedMixin?>
Deletes the specified ChatMessage posted by the authenticated MyUser.
editChatMessage(ChatItemId id, {ChatMessageTextInput? text, ChatMessageAttachmentsInput? attachments, ChatMessageRepliesInput? repliesTo}) Future<ChatEventsVersionedMixin?>
Edits a ChatMessage by the authenticated MyUser with the provided text/attachments/repliesTo (at least one of three must be specified).
favoriteChat(ChatId id, ChatFavoritePosition position) Future<ChatEventsVersionedMixin?>
Marks the specified Chat as favorited for the authenticated MyUser and sets its position in the favorites list.
favoriteChats({int? first, FavoriteChatsCursor? after, int? last, FavoriteChatsCursor? before}) Future<FavoriteChats$Query>
Returns favorite Chats of the authenticated MyUser ordered by the custom order of MyUser's favorites list (using Chat.favoritePosition field).
favoriteChatsEvents(FavoriteChatsListVersion? ver()) Stream<QueryResult<Object?>>
Subscribes to FavoriteChatsEvents of all Chats of the authenticated MyUser.
forwardChatItems(ChatId from, ChatId to, List<ChatItemQuoteInput> items, {ChatMessageText? text, List<AttachmentId>? attachments}) Future<ChatEventsVersionedMixin?>
Forwards ChatItems to the specified Chat by the authenticated MyUser.
getChat(ChatId id) Future<GetChat$Query>
Returns a Chat by its ID.
getMonolog() Future<ChatMixin?>
Returns the monolog Chat of the authenticated MyUser.
hideChat(ChatId chatId) Future<ChatEventsVersionedMixin?>
Marks the specified Chat as hidden for the authenticated MyUser.
hideChatItem(ChatItemId id) Future<ChatEventsVersionedMixin?>
Hides the specified ChatItem for the authenticated MyUser.
keepTyping(ChatId id) Stream<QueryResult<Object?>>
Notifies ChatMembers about the authenticated MyUser typing in the specified Chat at the moment.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postChatMessage(ChatId chatId, {ChatMessageText? text, List<AttachmentId>? attachments, List<ChatItemId> repliesTo = const []}) Future<ChatEventsVersionedMixin?>
Posts a new ChatMessage to the specified Chat by the authenticated MyUser.
readChat(ChatId chatId, ChatItemId untilId) Future<ChatEventsVersionedMixin?>
Marks the specified Chat as read for the authenticated MyUser until the specified ChatItem inclusively.
recentChats({int? first, RecentChatsCursor? after, int? last, RecentChatsCursor? before, bool noFavorite = false, bool? withOngoingCalls}) Future<RecentChats$Query>
Returns non-hidden Chats of the authenticated MyUser ordered descending by their last updating DateTime.
recentChatsTopEvents(int count, {bool noFavorite = false, bool? withOngoingCalls}) Stream<QueryResult<Object?>>
Subscribes to updates of top count items of recentChats list.
removeChatMember(ChatId chatId, UserId userId) Future<ChatEventsVersionedMixin?>
Removes an User from a Chat-group by the authority of the authenticated MyUser.
renameChat(ChatId id, ChatName? name) Future<ChatEventsVersionedMixin?>
Renames the specified Chat by authority of the authenticated MyUser.
toggleChatMute(ChatId id, Muting? mute) Future<ChatEventsVersionedMixin?>
Mutes or unmutes the specified Chat for the authenticated MyUser. Overrides an existing mute even if it's longer.
toString() String
A string representation of this object.
inherited
unfavoriteChat(ChatId id) Future<ChatEventsVersionedMixin?>
Removes the specified Chat from the favorites list of the authenticated MyUser.
updateChatAvatar(ChatId id, {MultipartFile? file, CropAreaInput? crop, void onSendProgress(int count, int total)?}) Future<ChatEventsVersionedMixin?>
Updates the Chat.avatar field with the provided image, or resets it to null, by authority of the authenticated MyUser.
uploadAttachment(MultipartFile? attachment, {void onSendProgress(int count, int total)?}) Future<UploadAttachment$Mutation$UploadAttachment$UploadAttachmentOk>
Creates a new Attachment linked to the authenticated MyUser for a later use in the postChatMessage mutation.
Uses the specified ChatDirectLink by the authenticated MyUser creating a new Chat-dialog or joining an existing Chat-group.

Operators

operator ==(Object other) bool
The equality operator.
inherited