TopicMe class
Special case of Topic for managing data of the current user, including contact list
Constructors
- TopicMe()
Properties
- acs ↔ AccessMode
-
This topic's access mode
getter/setter pairinherited
- clear ↔ int?
-
in case some messages were deleted, the greatest ID
of a deleted message, optional
getter/setter pairinherited
-
contacts
→ List<
TopicSubscription> -
no setter
- created ↔ DateTime?
-
Timestamp when the topic was created
getter/setter pairinherited
- defacs ↔ DefAcs?
-
topic's default access permissions; present only if the current user has 'S' permission
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSubscribed ↔ bool
-
getter/setter pairinherited
- lastDescUpdate → DateTime
-
no setterinherited
- lastSubsUpdate → DateTime?
-
no setterinherited
- maxDel → int
-
no setterinherited
- maxSeq → int
-
no setterinherited
-
messages
→ List<
DataMessage> -
Get all cached subscriptions for this topic
no setterinherited
- minSeq → int
-
no setterinherited
- name ↔ String?
-
This topic's name
getter/setter pairinherited
-
onAllMessagesReceived
↔ PublishSubject<
int> -
This event will be triggered when all messages are received
getter/setter pairinherited
-
onContactUpdate
↔ PublishSubject<
ContactUpdateEvent> -
This event will be triggered when a contact is updated
getter/setter pair
-
onCredsUpdated
↔ PublishSubject<
List< Credential> > -
This event will be triggered when credentials are updated
getter/setter pair
-
onData
↔ PublishSubject<
DataMessage?> -
This event will be triggered when a
data
message is receivedgetter/setter pairinherited -
onInfo
↔ PublishSubject<
InfoMessage> -
This event will be triggered when a
meta.info
message is receivedgetter/setter pairinherited -
onMeta
↔ PublishSubject<
MetaMessage> -
This event will be triggered when a
meta
message is receivedgetter/setter pairinherited -
onMetaDesc
↔ PublishSubject<
Topic> -
This event will be triggered when a
meta.desc
message is receivedgetter/setter pairinherited -
onMetaSub
↔ PublishSubject<
TopicSubscription> -
This event will be triggered when a
meta.sub
message is receivedgetter/setter pairinherited -
onPres
↔ PublishSubject<
PresMessage> -
This event will be triggered when a
pres
message is receivedgetter/setter pairinherited -
onSubsUpdated
↔ PublishSubject<
List< TopicSubscription> > -
This event will be triggered when topic subscriptions are updated
getter/setter pairinherited
-
onTagsUpdated
↔ PublishSubject<
List< String> > -
This event will be triggered when topic tags are updated
getter/setter pairinherited
- private ↔ dynamic
-
Application-defined data that's available to the current user only
getter/setter pairinherited
- public ↔ dynamic
-
Application-defined data that's available to all topic subscribers
getter/setter pairinherited
- read ↔ int?
-
Id of the message user claims through {note} message to have read, optional
getter/setter pairinherited
- recv ↔ int?
-
Like 'read', but received, optional
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seq ↔ int?
-
getter/setter pairinherited
- status ↔ String?
-
account status; included for
me
topic only, and only if the request is sent by a root-authenticated session.getter/setter pairinherited -
subscribers
→ Map<
String, TopicSubscription> -
Get all cached subscriptions for this topic
no setterinherited
-
User discovery tags
getter/setter pairinherited
- touched ↔ DateTime?
-
Timestamp of the last messages
getter/setter pairinherited
- updated ↔ DateTime
-
Timestamp when the topic was last updated
getter/setter pairinherited
Methods
-
allMessagesReceived(
int count) → void -
This should be called by
Tinode
when all messages are receivedinherited -
archive(
bool archive) → Future -
Archive or un-archive the topic. Wrapper for Tinode.setMeta
inherited
-
createMessage(
dynamic data, bool echo) → Message -
Create a draft of a message without sending it to the server
inherited
-
deleteCredential(
String method, String value) → Future< CtrlMessage> - Delete validation credential
-
deleteMessages(
List< DelRange> ranges, bool hard) → Future<CtrlMessage> -
Delete messages. Hard-deleting messages requires Owner permission
inherited
-
deleteMessagesAll(
bool hard) → Future< CtrlMessage> -
Delete all messages. Hard-deleting messages requires Owner permission
inherited
-
deleteMessagesList(
List< int> list, bool hard) → Future<CtrlMessage> -
Delete multiple messages defined by their IDs. Hard-deleting messages requires Owner permission
inherited
-
deleteSubscription(
String userId) → Future< CtrlMessage> -
Delete subscription. Requires Share permission. Wrapper for Tinode.deleteSubscription
inherited
-
deleteTopic(
bool hard) → Future< CtrlMessage> -
Delete topic. Requires Owner permission. Wrapper for Tinode.delTopic
inherited
-
flushMessage(
int seqId) → DataMessage? -
inherited
-
flushMessageRange(
int fromId, int untilId) → void -
inherited
-
getAccessMode(
) → AccessMode -
Get topic's access node
inherited
-
getContact(
String topicName) → TopicSubscription? - Get a contact from cache
-
getContactAccessMode(
String? topicName) → AccessMode? - Get access mode of a given contact from cache
-
getCredentials(
) → List< Credential> - Get the user's credentials: email, phone, etc.
-
getDefaultAccess(
) → DefAcs? -
Get topic's default access mode
inherited
-
getMessagesPage(
int limit, bool forward) → Future -
Request more messages from the server
inherited
-
getMeta(
GetQuery params) → Future -
Request topic metadata from the serve
inherited
-
getMsgReadRecv(
String contactName, String what) → int - Get cached read/received/message count for the given contact.
-
getTags(
) → List< String> -
Get topic's tags
inherited
-
getType(
) → String? -
Get type of the topic: me, p2p, grp, fnd...
inherited
-
invite(
String userId, String mode) → Future< CtrlMessage> -
Create new topic subscription. Wrapper for Tinode.setMeta
inherited
-
isArchived(
) → bool -
Check if topic is archived, i.e. private.arch == true.
inherited
-
isChannel(
) → bool -
Check if topic is a channel
inherited
-
isContactArchived(
String topicName) → bool? - Check if contact is archived, i.e. contact.private.arch == true.
-
isGroup(
) → bool -
Check if topic is a group topic
inherited
-
isNewMessage(
dynamic seqId) → bool -
Check if the given seq Id is id of the most recent message
seqId id of the message to check
inherited
-
isP2P(
) → bool -
Check if topic is a p2p topic
inherited
-
leave(
bool unsubscribe) → Future< CtrlMessage> -
Leave the topic, optionally unsubscribe. Leaving the topic means the topic will stop
receiving updates from the server. Unsubscribing will terminate user's relationship with the topic.
inherited
-
msgHasMoreMessages(
bool newer) → bool -
Check if cached message IDs indicate that the server may have more messages.
newer check for newer messages
inherited
-
msgReadCount(
int seq) → int -
Get the number of topic subscribers who marked this message (and all older messages) as read.
The current user is excluded from the count
inherited
-
msgRecvCount(
int seq) → int -
Get the number of topic subscribers who marked this message (and all older messages) as read
The current user is excluded from the count
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
noteKeyPress(
) → void -
Send a key-press notification. Wrapper for Tinode.noteKeyPress
inherited
-
noteRead(
int? seq) → void -
Send a 'read' receipt. Wrapper for Tinode.noteRead
inherited
-
noteReceive(
int seq) → void -
Send a 'recv' receipt. Wrapper for Tinode.noteRecv
inherited
-
p2pPeerDesc(
) → TopicSubscription? -
Get description of the p2p peer from subscription cache
inherited
-
processDelMessages(
int clear, List< DeleteTransactionRange> delseq) → void -
Delete cached messages and update cached transaction IDs
inherited
-
processMetaCreds(
List< Credential> creds, bool update) → void -
Called by Tinode when meta.sub is received.
override
-
processMetaDesc(
TopicDescription desc) → void -
Override the original Topic.processMetaDesc.
override
-
processMetaSub(
List< TopicSubscription> subscriptions) → void -
Override the original Topic.processMetaSub
override
-
processMetaTags(
List< String> tags) → void -
Called by Tinode when meta.tags is received.
inherited
-
publishMessage(
Message a) → Future< CtrlMessage> -
Publish message created by Topic.createMessage.
override
-
resetSubscription(
) → void -
Reset subscribed state
inherited
-
routeData(
DataMessage data) → void -
Process data message
inherited
-
routeInfo(
InfoMessage info) → void -
inherited
-
routeMeta(
MetaMessage meta) → void -
Called by
Tinode
inherited -
routePres(
PresMessage pres) → void -
Process presence change message
override
-
setMeta(
SetParams params) → Future< CtrlMessage> -
Update topic metadata
inherited
-
setMsgReadRecv(
String contactName, String what, int seq, DateTime? ts) → void - Update a cached contact with new read/received/message count
-
startMetaQuery(
) → MetaGetBuilder -
Initialize new meta {@link Tinode.GetQuery} builder. The query is attached to the current topic.
It will not work correctly if used with a different topic
inherited
-
subscribe(
GetQuery getParams, SetParams? setParams) → Future< CtrlMessage> -
inherited
-
subscriber(
String userId) → TopicSubscription? -
Get cached subscription for the given user Id
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateMode(
String? userId, String update) → Future< CtrlMessage> -
Update access mode of the current user or of another topic subscriber
inherited
-
userDescription(
String userId) → TopicSubscription? -
Get user description from global cache. The user does not need to be a
subscriber of this topic.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited