Skip to main content

tinode

message format

{
"txt": "this is bold, code and italic, strike combined bold and italic an url: https://www.example.com/abc#fragment and another www.tinode.co this is a @mention and a #hashtag in a string second #hashtag",
"fmt": [
{ "at": 8, "len": 4, "tp": "ST" },
{ "at": 14, "len": 4, "tp": "CO" },
{ "at": 23, "len": 6, "tp": "EM" },
{ "at": 31, "len": 6, "tp": "DL" },
{ "tp": "BR", "len": 1, "at": 37 },
{ "at": 56, "len": 6, "tp": "EM" },
{ "at": 47, "len": 15, "tp": "ST" },
{ "tp": "BR", "len": 1, "at": 62 },
{ "at": 120, "len": 13, "tp": "EM" },
{ "at": 71, "len": 36, "key": 0 },
{ "at": 120, "len": 13, "key": 1 },
{ "tp": "BR", "len": 1, "at": 133 },
{ "at": 144, "len": 8, "key": 2 },
{ "at": 159, "len": 8, "key": 3 },
{ "tp": "BR", "len": 1, "at": 179 },
{ "at": 187, "len": 8, "key": 3 },
{ "tp": "BR", "len": 1, "at": 195 }
],
"ent": [
{ "tp": "LN", "data": { "url": "https://www.example.com/abc#fragment" } },
{ "tp": "LN", "data": { "url": "http://www.tinode.co" } },
{ "tp": "MN", "data": { "val": "mention" } },
{ "tp": "HT", "data": { "val": "hashtag" } }
]
}
fmtfor
BRline break.
COcode or monotyped text, possibly with different background: monotype.
DLdeleted or strikethrough text: strikethrough.
EMemphasized text, usually represented as italic: italic.
FMform / set of fields; may also be represented as an entity.
HDhidden content.
HLhighlighted text, such as text in a different color or with a different background; the color cannot be specified.
RWlogical grouping of formats, a row; may also be represented as an entity.
STstrong or bold text: bold.
entfor
AUembedded audio.
BNinteractive button.
EXgeneric attachment.
FMform / set of fields; may also be represented as a basic decoration.
HThashtag, e.g. #hashtag.
IMinline image.
LNlink (URL) https://api.tinode.co.
MNmention such as @tinode.
RWlogical grouping of formats, a row; may also be represented as a basic decoration.
VCvideo (and audio) calls.
VDinline video.
{
"abc": {},
"extra": {
"attachments": ["/v0/file/s/sJOD_tZDPz0.jpg"],
"obo": "usr2il9suCbuko", // Alternative user ID set by the root user (obo = On Behalf Of).
"authlevel": "auth" // Altered authentication level set by the root user.
}
}