Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:comet:authentication [2018/02/17 17:17]
anastation468 [Sending messages for authorized users]
en:comet:authentication [2019/12/18 02:05] (current)
Line 25: Line 25:
 While messages from authorized users are sending by its ID ([[en:​comet:​cometql|insert query to table users_messages]]),​ messages is sending to all user’s devices (up to 16), where he is authorizing at this moment. It’s very convenient when some user has visited your site and has authorized here by more than one device. While messages from authorized users are sending by its ID ([[en:​comet:​cometql|insert query to table users_messages]]),​ messages is sending to all user’s devices (up to 16), where he is authorizing at this moment. It’s very convenient when some user has visited your site and has authorized here by more than one device.
   ​   ​
-If some user at that moment is offline, ​than sent message is placed into a queue of messages and would be delivered when it user will be online.+If some user at that moment is offline, ​then sent message is placed into a queue of messages and would be delivered when it user will be online.
  
 The main purpose of mentioned queue is delivering messages after a short-term user’s offline. For example, in those cases when user is updating some page in site where was opened a connection, and this user goes offline approximately for one second. The main purpose of mentioned queue is delivering messages after a short-term user’s offline. For example, in those cases when user is updating some page in site where was opened a connection, and this user goes offline approximately for one second.
Line 51: Line 51:
 These functions will be called when authorization status will be changing. I.e. at least once an authorization will be successful or unsuccessful when connecting to comet server or while status will be changed. ​ These functions will be called when authorization status will be changing. I.e. at least once an authorization will be successful or unsuccessful when connecting to comet server or while status will be changed. ​
  
-Also you can call the function “isAuthorized” to determine authorization status.+Alsoyou can call the function “isAuthorized” to determine authorization status.
 <code JavaScript>​cometApi.isAuthorized()</​code>​ <code JavaScript>​cometApi.isAuthorized()</​code>​
 The function “isAuthorized” may return 3 different values: ​ The function “isAuthorized” may return 3 different values: ​