tinode / chat

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots
GNU General Public License v3.0
12.07k stars 1.88k forks source link

The drafty document seems error #189

Closed BenDerPan closed 5 years ago

BenDerPan commented 5 years ago

FM example json example is invalid json string, the BN type data filed "oh yes!" with no key name

{
 "txt": "Do you agree? Yes No",
 "fmt": [
   {"at": 0, "len": 20, "tp": "FM"},
   {"at": 0, "len": 13, "tp": "ST"}
   {"at": 13, "len": 1, "tp": "BR"},
   {"at": 14, "len": 3, "key": 0},
   {"at": 17, "len": 1, "tp": "BR"},
   {"at": 18, "len": 2, "key": 1},
 ],
 "ent": [
   {"tp": "BN", "data": {"name": "yes", "act": "pub", "oh yes!"}},
   {"tp": "BN", "data": {"name": "no", "act": "pub"}}
 ]
}
or-else commented 5 years ago

Thanks, fixed https://github.com/tinode/chat/commit/f5d59ad8a346836defdf87a493d9934c6486b0de