[{"data":1,"prerenderedAt":1205},["ShallowReactive",2],{"navigation":3,"\u002Fguides\u002Fsubscriptions":116,"\u002Fguides\u002Fsubscriptions-surround":1200},[4,23,61,82,108,112],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":22},"Getting started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,14,18],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",false,{"title":24,"icon":25,"path":26,"stem":27,"children":28,"page":22},"Guides","i-lucide-book-open","\u002Fguides","2.guides",[29,33,37,41,45,49,53,57],{"title":30,"path":31,"stem":32},"Connection & config","\u002Fguides\u002Fconnection","2.guides\u002F1.connection",{"title":34,"path":35,"stem":36},"Publish, RPC, history, presence","\u002Fguides\u002Foperations","2.guides\u002F2.operations",{"title":38,"path":39,"stem":40},"Events","\u002Fguides\u002Fevents","2.guides\u002F3.events",{"title":42,"path":43,"stem":44},"Subscriptions","\u002Fguides\u002Fsubscriptions","2.guides\u002F4.subscriptions",{"title":46,"path":47,"stem":48},"Tokens","\u002Fguides\u002Ftokens","2.guides\u002F5.tokens",{"title":50,"path":51,"stem":52},"Payloads (base64 vs rawJson)","\u002Fguides\u002Fpayloads","2.guides\u002F6.payloads",{"title":54,"path":55,"stem":56},"Rust backend","\u002Fguides\u002Frust","2.guides\u002F7.rust",{"title":58,"path":59,"stem":60},"Permissions","\u002Fguides\u002Fpermissions","2.guides\u002F8.permissions",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":22},"API reference","i-lucide-file-code","\u002Freference","3.reference",[67,71,75,79],{"title":68,"path":69,"stem":70},"JavaScript API","\u002Freference\u002Fjavascript-api","3.reference\u002F1.javascript-api",{"title":72,"path":73,"stem":74},"Types","\u002Freference\u002Ftypes","3.reference\u002F2.types",{"title":76,"path":77,"stem":78},"Tauri commands","\u002Freference\u002Fcommands","3.reference\u002F3.commands",{"title":58,"path":80,"stem":81},"\u002Freference\u002Fpermissions","3.reference\u002F4.permissions",{"title":83,"icon":84,"path":85,"stem":86,"children":87,"page":22},"Platforms","i-lucide-monitor-smartphone","\u002Fplatforms","4.platforms",[88,92,96,100,104],{"title":89,"path":90,"stem":91},"Overview","\u002Fplatforms\u002Foverview","4.platforms\u002F1.overview",{"title":93,"path":94,"stem":95},"Desktop","\u002Fplatforms\u002Fdesktop","4.platforms\u002F2.desktop",{"title":97,"path":98,"stem":99},"Android","\u002Fplatforms\u002Fandroid","4.platforms\u002F3.android",{"title":101,"path":102,"stem":103},"iOS","\u002Fplatforms\u002Fios","4.platforms\u002F4.ios",{"title":105,"path":106,"stem":107},"Centrifugo server","\u002Fplatforms\u002Fserver","4.platforms\u002F5.server",{"title":109,"path":110,"stem":111},"Deprecations","\u002Fdeprecations","5.deprecations",{"title":113,"path":114,"stem":115},"Changelog","\u002Fchangelog","9.changelog",{"id":117,"title":42,"body":118,"description":1194,"extension":1195,"generated":22,"links":1196,"meta":1197,"navigation":217,"path":43,"seo":1198,"stem":44,"__hash__":1199},"docs\u002F2.guides\u002F4.subscriptions.md",{"type":119,"value":120,"toc":1187},"minimark",[121,134,352,387,407,412,559,562,566,576,658,667,671,688,1130,1138,1142,1154,1158,1183],[122,123,124,125,129,130,133],"p",{},"A subscription belongs to the current client. Channels from ",[126,127,128],"code",{},"connect({ channels })"," are subscribed\nwith default options; add more at any time after ",[126,131,132],{},"connect()",":",[135,136,141],"pre",{"className":137,"code":138,"language":139,"meta":140,"style":140},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import {\n  addSubscription, addSubscriptionWithOptions, removeSubscription,\n  removeAllSubscriptions, getSubscriptions,\n} from \"tauri-plugin-centrifugo-api\";\n\nawait addSubscription(\"news\");                       \u002F\u002F default options\nawait addSubscriptionWithOptions({ channel: \"chat:42\", recoverable: true, joinLeave: true });\n\nawait getSubscriptions();     \u002F\u002F { news: true, \"chat:42\": false }  true = subscribed now\nawait removeSubscription(\"news\");\nawait removeAllSubscriptions();\n","ts","",[126,142,143,156,177,190,212,219,249,301,306,321,340],{"__ignoreMap":140},[144,145,148,152],"span",{"class":146,"line":147},"line",1,[144,149,151],{"class":150},"s7zQu","import",[144,153,155],{"class":154},"sMK4o"," {\n",[144,157,159,163,166,169,171,174],{"class":146,"line":158},2,[144,160,162],{"class":161},"sTEyZ","  addSubscription",[144,164,165],{"class":154},",",[144,167,168],{"class":161}," addSubscriptionWithOptions",[144,170,165],{"class":154},[144,172,173],{"class":161}," removeSubscription",[144,175,176],{"class":154},",\n",[144,178,180,183,185,188],{"class":146,"line":179},3,[144,181,182],{"class":161},"  removeAllSubscriptions",[144,184,165],{"class":154},[144,186,187],{"class":161}," getSubscriptions",[144,189,176],{"class":154},[144,191,193,196,199,202,206,209],{"class":146,"line":192},4,[144,194,195],{"class":154},"}",[144,197,198],{"class":150}," from",[144,200,201],{"class":154}," \"",[144,203,205],{"class":204},"sfazB","tauri-plugin-centrifugo-api",[144,207,208],{"class":154},"\"",[144,210,211],{"class":154},";\n",[144,213,215],{"class":146,"line":214},5,[144,216,218],{"emptyLinePlaceholder":217},true,"\n",[144,220,222,225,229,232,234,237,239,242,245],{"class":146,"line":221},6,[144,223,224],{"class":150},"await",[144,226,228],{"class":227},"s2Zo4"," addSubscription",[144,230,231],{"class":161},"(",[144,233,208],{"class":154},[144,235,236],{"class":204},"news",[144,238,208],{"class":154},[144,240,241],{"class":161},")",[144,243,244],{"class":154},";",[144,246,248],{"class":247},"sHwdD","                       \u002F\u002F default options\n",[144,250,252,254,256,258,261,265,267,269,272,274,276,279,281,285,287,290,292,294,297,299],{"class":146,"line":251},7,[144,253,224],{"class":150},[144,255,168],{"class":227},[144,257,231],{"class":161},[144,259,260],{"class":154},"{",[144,262,264],{"class":263},"swJcz"," channel",[144,266,133],{"class":154},[144,268,201],{"class":154},[144,270,271],{"class":204},"chat:42",[144,273,208],{"class":154},[144,275,165],{"class":154},[144,277,278],{"class":263}," recoverable",[144,280,133],{"class":154},[144,282,284],{"class":283},"sfNiH"," true",[144,286,165],{"class":154},[144,288,289],{"class":263}," joinLeave",[144,291,133],{"class":154},[144,293,284],{"class":283},[144,295,296],{"class":154}," }",[144,298,241],{"class":161},[144,300,211],{"class":154},[144,302,304],{"class":146,"line":303},8,[144,305,218],{"emptyLinePlaceholder":217},[144,307,309,311,313,316,318],{"class":146,"line":308},9,[144,310,224],{"class":150},[144,312,187],{"class":227},[144,314,315],{"class":161},"()",[144,317,244],{"class":154},[144,319,320],{"class":247},"     \u002F\u002F { news: true, \"chat:42\": false }  true = subscribed now\n",[144,322,324,326,328,330,332,334,336,338],{"class":146,"line":323},10,[144,325,224],{"class":150},[144,327,173],{"class":227},[144,329,231],{"class":161},[144,331,208],{"class":154},[144,333,236],{"class":204},[144,335,208],{"class":154},[144,337,241],{"class":161},[144,339,211],{"class":154},[144,341,343,345,348,350],{"class":146,"line":342},11,[144,344,224],{"class":150},[144,346,347],{"class":227}," removeAllSubscriptions",[144,349,315],{"class":161},[144,351,211],{"class":154},[122,353,354,357,358,361,362,365,366,369,370,373,374,378,379,382,383,386],{},[126,355,356],{},"addSubscription*"," resolve once the subscription is created; the result arrives as ",[126,359,360],{},"subscribing","\n→ ",[126,363,364],{},"subscribed"," (or ",[126,367,368],{},"error"," \u002F ",[126,371,372],{},"unsubscribed",") ",[375,376,377],"a",{"href":39},"events",". Adding a channel that is\nalready added rejects with ",[126,380,381],{},"{ RequestError: \"duplicate subscription\" }",". ",[126,384,385],{},"removeSubscription"," of an\nunknown channel does nothing.",[122,388,389,392,393,395,396,399,400,403,404,406],{},[126,390,391],{},"disconnect()"," drops every subscription. A new ",[126,394,132],{}," subscribes only its own ",[126,397,398],{},"channels",", so\nadd the dynamic ones again after it (for example in ",[126,401,402],{},"onConnected",", or keep them in ",[126,405,398],{},").",[408,409,411],"h2",{"id":410},"options","Options",[413,414,415,431],"table",{},[416,417,418],"thead",{},[419,420,421,425,428],"tr",{},[422,423,424],"th",{},"Option",[422,426,427],{},"Meaning",[422,429,430],{},"Server side",[432,433,434,447,468,493,506,532,547],"tbody",{},[419,435,436,442,445],{},[437,438,439],"td",{},[126,440,441],{},"channel",[437,443,444],{},"Channel name.",[437,446],{},[419,448,449,454,465],{},[437,450,451],{},[126,452,453],{},"token",[437,455,456,457,460,461,464],{},"Subscription JWT for a private channel; refreshed through ",[126,458,459],{},"need_sub_token",", see ",[375,462,46],{"href":463},"\u002Fguides\u002Ftokens#subscription-tokens",".",[437,466,467],{},"token HMAC\u002FRSA key",[419,469,470,475,478],{},[437,471,472],{},[126,473,474],{},"recoverable",[437,476,477],{},"After a reconnect, get the publications missed while offline.",[437,479,480,481,484,485,488,489,492],{},"history (",[126,482,483],{},"history_size",", ",[126,486,487],{},"history_ttl","); ",[126,490,491],{},"force_recovery"," makes it the default",[419,494,495,500,503],{},[437,496,497],{},[126,498,499],{},"positioned",[437,501,502],{},"The server checks the stream position and resubscribes the client on a gap.",[437,504,505],{},"history",[419,507,508,513,523],{},[437,509,510],{},[126,511,512],{},"joinLeave",[437,514,515,516,369,519,522],{},"Get ",[126,517,518],{},"join",[126,520,521],{},"leave"," events.",[437,524,525,528,529,241],{},[126,526,527],{},"join_leave"," (and ",[126,530,531],{},"presence",[419,533,534,539,542],{},[437,535,536],{},[126,537,538],{},"delta",[437,540,541],{},"Fossil delta compression of publications.",[437,543,544],{},[126,545,546],{},"allowed_delta_types: [\"fossil\"]",[419,548,549,554,557],{},[437,550,551],{},[126,552,553],{},"since",[437,555,556],{},"Start from a saved stream position, see below.",[437,558,505],{},[122,560,561],{},"Server option names are the Centrifugo v5 channel options; v6 groups them differently.",[408,563,565],{"id":564},"recovery","Recovery",[122,567,568,569,572,573,575],{},"With ",[126,570,571],{},"recoverable: true"," the SDK remembers the stream position. After a reconnect it asks the\nserver for what it missed; the ",[126,574,364],{}," event tells how it went:",[135,577,579],{"className":137,"code":578,"language":139,"meta":140,"style":140},"await onSubscribed(({ payload }) => {\n  if (payload.wasRecovering && !payload.recovered) {\n    \u002F\u002F Too many publications missed (history is shorter): reload the state from your backend.\n  }\n});\n",[126,580,581,606,640,645,650],{"__ignoreMap":140},[144,582,583,585,588,590,593,597,600,604],{"class":146,"line":147},[144,584,224],{"class":150},[144,586,587],{"class":227}," onSubscribed",[144,589,231],{"class":161},[144,591,592],{"class":154},"({",[144,594,596],{"class":595},"sHdIc"," payload",[144,598,599],{"class":154}," })",[144,601,603],{"class":602},"spNyl"," =>",[144,605,155],{"class":154},[144,607,608,611,614,617,619,622,625,628,630,632,635,637],{"class":146,"line":158},[144,609,610],{"class":150},"  if",[144,612,613],{"class":263}," (",[144,615,616],{"class":161},"payload",[144,618,464],{"class":154},[144,620,621],{"class":161},"wasRecovering",[144,623,624],{"class":154}," &&",[144,626,627],{"class":154}," !",[144,629,616],{"class":161},[144,631,464],{"class":154},[144,633,634],{"class":161},"recovered",[144,636,373],{"class":263},[144,638,639],{"class":154},"{\n",[144,641,642],{"class":146,"line":179},[144,643,644],{"class":247},"    \u002F\u002F Too many publications missed (history is shorter): reload the state from your backend.\n",[144,646,647],{"class":146,"line":192},[144,648,649],{"class":154},"  }\n",[144,651,652,654,656],{"class":146,"line":214},[144,653,195],{"class":154},[144,655,241],{"class":161},[144,657,211],{"class":154},[122,659,660,661,664,665,464],{},"Recovered publications arrive as normal ",[126,662,663],{},"publication"," events right after ",[126,666,364],{},[408,668,670],{"id":669},"resume-from-a-saved-position","Resume from a saved position",[122,672,673,674,676,677,613,680,683,684,687],{},"The position also survives an app restart if you store it. ",[126,675,364],{}," carries\n",[126,678,679],{},"streamPosition",[126,681,682],{},"{ offset, epoch }",") for recoverable and positioned subscriptions (after a\nrecovery, the position it recovered from); the ",[126,685,686],{},"offset"," of each publication moves it forward.",[135,689,691],{"className":137,"code":690,"language":139,"meta":140,"style":140},"import { addSubscriptionWithOptions, onPublication, onSubscribed } from \"tauri-plugin-centrifugo-api\";\n\nlet epoch = localStorage.getItem(\"chat.epoch\");\nawait onSubscribed(({ payload }) => {\n  if (payload.channel === \"chat\" && payload.streamPosition) {\n    epoch = payload.streamPosition.epoch;\n    localStorage.setItem(\"chat.epoch\", epoch);\n    localStorage.setItem(\"chat.offset\", String(payload.streamPosition.offset));\n  }\n});\nawait onPublication(({ payload }) => {\n  if (payload.channel === \"chat\" && payload.offset != null) localStorage.setItem(\"chat.offset\", String(payload.offset));\n});\n\nconst offset = localStorage.getItem(\"chat.offset\");\nawait addSubscriptionWithOptions({\n  channel: \"chat\",\n  recoverable: true,\n  since: epoch && offset ? { offset: Number(offset), epoch } : undefined,\n});\n",[126,692,693,723,727,759,777,811,832,859,898,902,910,928,996,1005,1010,1039,1050,1066,1078,1121],{"__ignoreMap":140},[144,694,695,697,700,702,704,707,709,711,713,715,717,719,721],{"class":146,"line":147},[144,696,151],{"class":150},[144,698,699],{"class":154}," {",[144,701,168],{"class":161},[144,703,165],{"class":154},[144,705,706],{"class":161}," onPublication",[144,708,165],{"class":154},[144,710,587],{"class":161},[144,712,296],{"class":154},[144,714,198],{"class":150},[144,716,201],{"class":154},[144,718,205],{"class":204},[144,720,208],{"class":154},[144,722,211],{"class":154},[144,724,725],{"class":146,"line":158},[144,726,218],{"emptyLinePlaceholder":217},[144,728,729,732,735,738,741,743,746,748,750,753,755,757],{"class":146,"line":179},[144,730,731],{"class":602},"let",[144,733,734],{"class":161}," epoch ",[144,736,737],{"class":154},"=",[144,739,740],{"class":161}," localStorage",[144,742,464],{"class":154},[144,744,745],{"class":227},"getItem",[144,747,231],{"class":161},[144,749,208],{"class":154},[144,751,752],{"class":204},"chat.epoch",[144,754,208],{"class":154},[144,756,241],{"class":161},[144,758,211],{"class":154},[144,760,761,763,765,767,769,771,773,775],{"class":146,"line":192},[144,762,224],{"class":150},[144,764,587],{"class":227},[144,766,231],{"class":161},[144,768,592],{"class":154},[144,770,596],{"class":595},[144,772,599],{"class":154},[144,774,603],{"class":602},[144,776,155],{"class":154},[144,778,779,781,783,785,787,789,792,794,797,799,801,803,805,807,809],{"class":146,"line":214},[144,780,610],{"class":150},[144,782,613],{"class":263},[144,784,616],{"class":161},[144,786,464],{"class":154},[144,788,441],{"class":161},[144,790,791],{"class":154}," ===",[144,793,201],{"class":154},[144,795,796],{"class":204},"chat",[144,798,208],{"class":154},[144,800,624],{"class":154},[144,802,596],{"class":161},[144,804,464],{"class":154},[144,806,679],{"class":161},[144,808,373],{"class":263},[144,810,639],{"class":154},[144,812,813,816,819,821,823,825,827,830],{"class":146,"line":221},[144,814,815],{"class":161},"    epoch",[144,817,818],{"class":154}," =",[144,820,596],{"class":161},[144,822,464],{"class":154},[144,824,679],{"class":161},[144,826,464],{"class":154},[144,828,829],{"class":161},"epoch",[144,831,211],{"class":154},[144,833,834,837,839,842,844,846,848,850,852,855,857],{"class":146,"line":251},[144,835,836],{"class":161},"    localStorage",[144,838,464],{"class":154},[144,840,841],{"class":227},"setItem",[144,843,231],{"class":263},[144,845,208],{"class":154},[144,847,752],{"class":204},[144,849,208],{"class":154},[144,851,165],{"class":154},[144,853,854],{"class":161}," epoch",[144,856,241],{"class":263},[144,858,211],{"class":154},[144,860,861,863,865,867,869,871,874,876,878,881,883,885,887,889,891,893,896],{"class":146,"line":303},[144,862,836],{"class":161},[144,864,464],{"class":154},[144,866,841],{"class":227},[144,868,231],{"class":263},[144,870,208],{"class":154},[144,872,873],{"class":204},"chat.offset",[144,875,208],{"class":154},[144,877,165],{"class":154},[144,879,880],{"class":227}," String",[144,882,231],{"class":263},[144,884,616],{"class":161},[144,886,464],{"class":154},[144,888,679],{"class":161},[144,890,464],{"class":154},[144,892,686],{"class":161},[144,894,895],{"class":263},"))",[144,897,211],{"class":154},[144,899,900],{"class":146,"line":308},[144,901,649],{"class":154},[144,903,904,906,908],{"class":146,"line":323},[144,905,195],{"class":154},[144,907,241],{"class":161},[144,909,211],{"class":154},[144,911,912,914,916,918,920,922,924,926],{"class":146,"line":342},[144,913,224],{"class":150},[144,915,706],{"class":227},[144,917,231],{"class":161},[144,919,592],{"class":154},[144,921,596],{"class":595},[144,923,599],{"class":154},[144,925,603],{"class":602},[144,927,155],{"class":154},[144,929,931,933,935,937,939,941,943,945,947,949,951,953,955,957,960,963,965,968,970,972,974,976,978,980,982,984,986,988,990,992,994],{"class":146,"line":930},12,[144,932,610],{"class":150},[144,934,613],{"class":263},[144,936,616],{"class":161},[144,938,464],{"class":154},[144,940,441],{"class":161},[144,942,791],{"class":154},[144,944,201],{"class":154},[144,946,796],{"class":204},[144,948,208],{"class":154},[144,950,624],{"class":154},[144,952,596],{"class":161},[144,954,464],{"class":154},[144,956,686],{"class":161},[144,958,959],{"class":154}," !=",[144,961,962],{"class":154}," null",[144,964,373],{"class":263},[144,966,967],{"class":161},"localStorage",[144,969,464],{"class":154},[144,971,841],{"class":227},[144,973,231],{"class":263},[144,975,208],{"class":154},[144,977,873],{"class":204},[144,979,208],{"class":154},[144,981,165],{"class":154},[144,983,880],{"class":227},[144,985,231],{"class":263},[144,987,616],{"class":161},[144,989,464],{"class":154},[144,991,686],{"class":161},[144,993,895],{"class":263},[144,995,211],{"class":154},[144,997,999,1001,1003],{"class":146,"line":998},13,[144,1000,195],{"class":154},[144,1002,241],{"class":161},[144,1004,211],{"class":154},[144,1006,1008],{"class":146,"line":1007},14,[144,1009,218],{"emptyLinePlaceholder":217},[144,1011,1013,1016,1019,1021,1023,1025,1027,1029,1031,1033,1035,1037],{"class":146,"line":1012},15,[144,1014,1015],{"class":602},"const",[144,1017,1018],{"class":161}," offset ",[144,1020,737],{"class":154},[144,1022,740],{"class":161},[144,1024,464],{"class":154},[144,1026,745],{"class":227},[144,1028,231],{"class":161},[144,1030,208],{"class":154},[144,1032,873],{"class":204},[144,1034,208],{"class":154},[144,1036,241],{"class":161},[144,1038,211],{"class":154},[144,1040,1042,1044,1046,1048],{"class":146,"line":1041},16,[144,1043,224],{"class":150},[144,1045,168],{"class":227},[144,1047,231],{"class":161},[144,1049,639],{"class":154},[144,1051,1053,1056,1058,1060,1062,1064],{"class":146,"line":1052},17,[144,1054,1055],{"class":263},"  channel",[144,1057,133],{"class":154},[144,1059,201],{"class":154},[144,1061,796],{"class":204},[144,1063,208],{"class":154},[144,1065,176],{"class":154},[144,1067,1069,1072,1074,1076],{"class":146,"line":1068},18,[144,1070,1071],{"class":263},"  recoverable",[144,1073,133],{"class":154},[144,1075,284],{"class":283},[144,1077,176],{"class":154},[144,1079,1081,1084,1086,1088,1091,1093,1096,1098,1101,1103,1106,1109,1111,1113,1115,1118],{"class":146,"line":1080},19,[144,1082,1083],{"class":263},"  since",[144,1085,133],{"class":154},[144,1087,734],{"class":161},[144,1089,1090],{"class":154},"&&",[144,1092,1018],{"class":161},[144,1094,1095],{"class":154},"?",[144,1097,699],{"class":154},[144,1099,1100],{"class":263}," offset",[144,1102,133],{"class":154},[144,1104,1105],{"class":227}," Number",[144,1107,1108],{"class":161},"(offset)",[144,1110,165],{"class":154},[144,1112,734],{"class":161},[144,1114,195],{"class":154},[144,1116,1117],{"class":154}," :",[144,1119,1120],{"class":154}," undefined,\n",[144,1122,1124,1126,1128],{"class":146,"line":1123},20,[144,1125,195],{"class":154},[144,1127,241],{"class":161},[144,1129,211],{"class":154},[122,1131,1132,1134,1135,406],{},[126,1133,553],{}," makes the subscription start by recovering from that position (",[126,1136,1137],{},"wasRecovering: true",[408,1139,1141],{"id":1140},"delta-compression","Delta compression",[122,1143,1144,1147,1148,1150,1151,406],{},[126,1145,1146],{},"delta: true"," asks for fossil deltas: the server sends only the difference to the previous\npublication and the SDK restores the full data, so ",[126,1149,663],{}," events look the same. Useful for\nbig, slowly changing payloads. The channel must allow it (",[126,1152,1153],{},"allowed_delta_types",[408,1155,1157],{"id":1156},"join-leave","Join \u002F leave",[122,1159,568,1160,1163,1164,1166,1167,1169,1170,1173,1174,1177,1178,464],{},[126,1161,1162],{},"joinLeave: true"," (and join\u002Fleave enabled for the channel) you get ",[126,1165,518],{}," and ",[126,1168,521],{}," events\nwith the client info. There is no helper; use ",[126,1171,1172],{},"onCentrifugoEvent(\"join\", ...)",", see\n",[375,1175,38],{"href":1176},"\u002Fguides\u002Fevents#client-side-subscriptions",". For who is online now use\n",[375,1179,1181],{"href":1180},"\u002Fguides\u002Foperations#presence",[126,1182,531],{},[1184,1185,1186],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"title":140,"searchDepth":158,"depth":179,"links":1188},[1189,1190,1191,1192,1193],{"id":410,"depth":158,"text":411},{"id":564,"depth":158,"text":565},{"id":669,"depth":158,"text":670},{"id":1140,"depth":158,"text":1141},{"id":1156,"depth":158,"text":1157},"Client-side subscriptions with options - recovery, resume from a position, delta compression, join\u002Fleave.","md",null,{},{"title":42,"description":1194},"vtxE4h4gHlFbZlrvrOO_vfpP_ffDBKhm1WdcOfY9qh4",[1201,1203],{"title":38,"path":39,"stem":40,"description":1202,"children":-1},"Every centrifugo:* event, its payload, and the listener helpers.",{"title":46,"path":47,"stem":48,"description":1204,"children":-1},"Connection and subscription JWTs - token vs requestToken, need_token \u002F provideToken, need_sub_token \u002F subRefresh.",1794166800621]