10 changed files with 3923 additions and 217 deletions
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
<mxfile host="app.diagrams.net" modified="2020-03-25T11:47:06.646Z" agent="Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" etag="Qg-H8qw5PNRbwVIDfC8J" version="12.9.1" type="device"><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7V1bd6M4Ev4t++Bzph+Swx38mKQnM73bvd2b9ExvzxsG2WYaIw/ISTy/fiUBtpEEli8gvPglMbIQQlX16atSSR6ZD4u3X1J/Of8EQxCPDC18G5nvR4ah65qB/5GSdV7iWF5eMEujsKi0LXiO/gZFoVaUrqIQZJWKCMIYRctqYQCTBASoUuanKXytVpvCuPrUpT8DXMFz4Md86bcoRPO81DPcbfmvIJrNyyfrzjj/ZuGXlYs3yeZ+CF93isyfR+ZDCiHKPy3eHkBMBq8cl28f1t/ijz+cX/75n+wv/7f7f3399+83eWOPh9yyeYUUJOjopt1fv99Nlo/ru6f1p/TBe/0KfvujbDpD63K8QIiHr7iEKZrDGUz8+Odt6X0KV0kISKsavtrW+QjhEhfquPBPgNC60AV/hSAumqNFXHyL3yJd/5fcf2uXl9+L5ujF+7fK1bq4yvtKOsiIds+4lC8JV2lQ3Lq8vzfQCv3+6e/Fw/zzHx7yxjc3ZqGefjoDqKGevRE+thoAFwB3Et+XgthH0Uu1c36hvrNNva2I8IdCSmKJNXXyxY9XxZNGhhPj7t6H0Qv+OEN0pPKiSVnwxU8zgG/78PRAVBtkGTGbslbK3od7NhGUCZ4gKIrKAuTPspHxsB16+hmPblG6yGY7jUdc50XdqjyPUV1soEvycZnCAL8hrvI6jxB4XvpU7K8Y4KqKOPGDHzOqzp9XKI4SUJRPozh+gDFMabvmdAqcIMDlGUrhD7DzTeiOJ9pWNWU18QWkCLzt6AmvTMW3pp3fUYCvVUDR6xbJ9BKe5jso5mina58QL4wrXjA4IIEXutERYAhFZqoQWV+G3lMJ1bYMVN+lBJc57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RX6z8VCLfKjWHg3Fo2PXxpb6gU54KxFjpVbpFt/evGGyTwBtEoTKhLSXBrcbH6lW4OTP0GAxPyHpjn6IRgVB403rmBstIHlPc2CPnpR4xT1YAmPFwAx4Zl4tmV3SXh0TZeMjnpmWxg/1G3Unmx01Ds1NHOafKTO0OSs6Dn/yQCBKZGNcJKuzpfy8HKazvPhiSLEBkvkwxk983hCG3ihJQIAz5iYTptrlCwAKD9FIVfuinrVrY2X2sDoQd1UUswheWMvfhr5k5gmgWY0GEYpR34wowbeArA8LELWkaooXM52mOVs0d6nbhezveshAfwhAWPBDoZOdz9510MCuM3onurN6B7vmQ1OKOw5J+othXeehodfps5k7Ck3FakzO2vZyMk/rMM7uUT+DTx2b4ufFxFCgIRDpvTsiUkKXiK0zoMt9Jc8spxGvWDfS/u0IdRf6auU4RisTGSxj7Sx6B2Fnk6nRs2igTNx7E4ptOwWQp39kZjz/RYkn0V2iApzPwhzOUqcRMGPf6wyDHaWNodUXwv1Hdn35MvcF6A16CdayX5/Veh6hbZlncJjFBpfphCi3QQNPGTzTzAEpMb/AA==</diagram></mxfile> |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 57 KiB |
@ -0,0 +1,84 @@
@@ -0,0 +1,84 @@
|
||||
@startuml |
||||
hide circle |
||||
skinparam linetype polyline |
||||
|
||||
entity servers { |
||||
* **id** |
||||
* domain |
||||
} |
||||
entity users { |
||||
* **id** |
||||
* username |
||||
# server //servers// |
||||
} |
||||
servers --{ users |
||||
entity local_users { |
||||
# user_id //users// |
||||
* password |
||||
* email |
||||
} |
||||
users --{ local_users |
||||
entity local_user_devices { |
||||
* **id** |
||||
* name |
||||
# user_id //users// |
||||
* highest_seq |
||||
} |
||||
users --{ local_user_devices |
||||
entity groupchats { |
||||
* **uuid** |
||||
subject |
||||
} |
||||
entity groupchat_directory_entries { |
||||
* **name** |
||||
# uuid //groupchats// |
||||
} |
||||
groupchats --{ groupchat_directory_entries |
||||
entity groupchat_roles { |
||||
* **role_id** |
||||
# groupchat_uuid //groupchats// |
||||
* role_name |
||||
} |
||||
groupchats --{ groupchat_roles |
||||
entity groupchat_role_capabilities { |
||||
# role_id //groupchat_roles// |
||||
* capability |
||||
} |
||||
groupchat_roles --{ groupchat_role_capabilities |
||||
entity groupchat_memberships { |
||||
# **groupchat_uuid** //groupchats// |
||||
# **user_id** //users// |
||||
# role_id //groupchat_roles// |
||||
} |
||||
groupchats --{ groupchat_memberships |
||||
users --{ groupchat_memberships |
||||
groupchat_roles -- groupchat_memberships |
||||
|
||||
entity messages { |
||||
* **msgid** |
||||
* seq |
||||
# user_from //users// |
||||
# user_to //users// |
||||
# groupchat_to //groupchats// |
||||
* tags |
||||
* body |
||||
* origin_ts |
||||
* local_ts |
||||
* is_notice |
||||
} |
||||
users --{ messages |
||||
groupchats --{ messages |
||||
entity system_messages { |
||||
* **msgid** |
||||
* seq |
||||
* type |
||||
# user_ref //users// |
||||
# target_user_ref //users// |
||||
# groupchat_ref //groupchats// |
||||
body |
||||
* local_ts |
||||
} |
||||
|
||||
users --{ system_messages |
||||
groupchats --{ system_messages |
||||
@enduml |
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
@startuml |
||||
start |
||||
repeat |
||||
:Receive a message from the user; |
||||
if (Is the command //USER//, //NICK//,\n//PASS//, or //CAP//?) then (yes) |
||||
:Process it appropriately,\nstoring the supplied information; |
||||
else (no) |
||||
:Return an error; |
||||
endif |
||||
if (Has the user attempted SASL?) then (yes) |
||||
://Check the authentication information//\nprovided by the user; |
||||
endif |
||||
repeat while (Is the user //able to register//?) is (no) |
||||
->yes; |
||||
if (Has the user supplied a password\nvia //PASS//?) then (yes) |
||||
://Check the authentication information//\nwith the nickname and password provided; |
||||
if (Did authentication fail?) then (yes) |
||||
:Disconnect the user; |
||||
stop |
||||
endif |
||||
endif |
||||
if (Is there a stored user ID?) then (yes) |
||||
:Registration successful!; |
||||
:Send registration welcome messages; |
||||
:Rejoin the user to all groupchats; |
||||
:Replay offline messages; |
||||
stop |
||||
else (no) |
||||
:Disconnect the user; |
||||
stop |
||||
endif |
||||
@enduml |
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
@startuml |
||||
start |
||||
repeat |
||||
:Receive a message from the user; |
||||
if (Is message command //USER//?) then (yes) |
||||
:Set the user's username and realname; |
||||
elseif (...//NICK//?) then (yes) |
||||
if (Is the nickname free?) then (yes) |
||||
:Set the user's nickname; |
||||
else (no) |
||||
:Return an error; |
||||
endif |
||||
elseif (...//PASS//?) then (yes) |
||||
:Make a note of the password supplied; |
||||
else (something else) |
||||
:Return an error; |
||||
endif |
||||
repeat while (Is a username and nickname set?) is (no) |
||||
->yes; |
||||
if (Is password authentication on?) then (yes) |
||||
if (Is the password wrong or nonexistent?) then (yes) |
||||
:Disconnect the user; |
||||
stop |
||||
endif |
||||
endif |
||||
:Send registration welcome messages; |
||||
:Move into next phase; |
||||
stop |
||||
@enduml |
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
@startuml |
||||
start |
||||
:Initialize empty variables //tags//, //source// and //args//.\nSet //msg// to the message text; |
||||
repeat |
||||
if (Is //source// or //args// non-null?) then (yes) |
||||
if (Is there a colon character in //msg// with a space before it?) then (yes) |
||||
:Split //msg// in two at the colon bit; |
||||
://Slurp arguments//, providing the first half (before the colon) as //arguments// and the second half as //trailing//; |
||||
else (no) |
||||
://Slurp arguments//, providing the rest of //msg// as //arguments// and nothing as //trailing//; |
||||
endif |
||||
else (no) |
||||
:Split //msg// at the first space character\nproducing //first-word// and //rest//; |
||||
if (Is there nothing after the space character, or no space character?) then (yes) |
||||
stop |
||||
else (no) |
||||
if (Does //first-word// start with @?) then (yes) |
||||
://tags// = //parse tags//(//first-word//). |
||||
: |
||||
endif |
||||
endif |
||||
stop |
||||
@enduml |
Loading…
Reference in new issue