annotate src/index.html.luan @ 58:7b6691bd65c3

chat_key
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 04 Mar 2025 07:38:43 -0700
parents 323ddacc1593
children 8270106644db
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
1 local Luan = require "luan:Luan.luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
2 local error = Luan.error
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
3 local ipairs = Luan.ipairs or error()
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
4 local pairs = Luan.pairs or error()
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents: 9
diff changeset
5 local range = Luan.range or error()
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
6 local Table = require "luan:Table.luan"
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
7 local concat = Table.concat or error()
5
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
8 local is_empty = Table.is_empty or error()
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
9 local size = Table.size or error()
46
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 38
diff changeset
10 local Parsers = require "luan:Parsers.luan"
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 38
diff changeset
11 local json_string = Parsers.json_string or error()
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
12 local Io = require "luan:Io.luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
13 local Http = require "luan:http/Http.luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
14 local Shared = require "site:/lib/Shared.luan"
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
15 local head = Shared.head or error()
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
16 local header = Shared.header or error()
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents: 9
diff changeset
17 local started = Shared.started or error()
15
8b8905f63d80 add get_chats
Franklin Schmidt <fschmidt@gmail.com>
parents: 10
diff changeset
18 local chats_html = Shared.chats_html or error()
17
7230c821c368 push fixes
Franklin Schmidt <fschmidt@gmail.com>
parents: 15
diff changeset
19 local http_push_to_users = Shared.http_push_to_users or error()
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
20 local User = require "site:/lib/User.luan"
5
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
21 local current_user = User.current or error()
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
22 local get_user_by_email = User.get_by_email or error()
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
23 local Utils = require "site:/lib/Utils.luan"
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
24 local to_set = Utils.to_set or error()
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
25 local Db = require "site:/lib/Db.luan"
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
26 local run_in_transaction = Db.run_in_transaction or error()
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
27 local Chat = require "site:/lib/Chat.luan"
58
7b6691bd65c3 chat_key
Franklin Schmidt <fschmidt@gmail.com>
parents: 56
diff changeset
28 local get_chat_by_user_ids = Chat.get_by_user_ids or error()
8
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
29 local Logging = require "luan:logging/Logging.luan"
21
5a56297713a3 move chat to home
Franklin Schmidt <fschmidt@gmail.com>
parents: 20
diff changeset
30 local logger = Logging.logger "index.html"
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
31
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
32
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
33 local function get_chat(with)
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
34 local ids = {}
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
35 for email in pairs(with) do
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
36 local with_user = get_user_by_email(email) or error()
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
37 local id = with_user.id
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
38 ids[#ids+1] = id
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
39 end
17
7230c821c368 push fixes
Franklin Schmidt <fschmidt@gmail.com>
parents: 15
diff changeset
40 local need_push = false
7230c821c368 push fixes
Franklin Schmidt <fschmidt@gmail.com>
parents: 15
diff changeset
41 local chat = run_in_transaction( function()
58
7b6691bd65c3 chat_key
Franklin Schmidt <fschmidt@gmail.com>
parents: 56
diff changeset
42 local chat = get_chat_by_user_ids(ids)
7b6691bd65c3 chat_key
Franklin Schmidt <fschmidt@gmail.com>
parents: 56
diff changeset
43 if chat == nil then
7b6691bd65c3 chat_key
Franklin Schmidt <fschmidt@gmail.com>
parents: 56
diff changeset
44 chat = Chat.new{
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
45 user_ids = ids
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
46 }
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
47 chat.save()
17
7230c821c368 push fixes
Franklin Schmidt <fschmidt@gmail.com>
parents: 15
diff changeset
48 need_push = true
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
49 end
58
7b6691bd65c3 chat_key
Franklin Schmidt <fschmidt@gmail.com>
parents: 56
diff changeset
50 return chat
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
51 end )
17
7230c821c368 push fixes
Franklin Schmidt <fschmidt@gmail.com>
parents: 15
diff changeset
52 if need_push then
7230c821c368 push fixes
Franklin Schmidt <fschmidt@gmail.com>
parents: 15
diff changeset
53 local js = "getChats('"..chat.id.."')"
7230c821c368 push fixes
Franklin Schmidt <fschmidt@gmail.com>
parents: 15
diff changeset
54 http_push_to_users( chat.user_ids, js )
7230c821c368 push fixes
Franklin Schmidt <fschmidt@gmail.com>
parents: 15
diff changeset
55 end
7230c821c368 push fixes
Franklin Schmidt <fschmidt@gmail.com>
parents: 15
diff changeset
56 return chat
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
57 end
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
58
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
59 return function()
46
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 38
diff changeset
60 local with_email = Http.request.parameters.with
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 38
diff changeset
61 local with = to_set(with_email)
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
62 local user = current_user()
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
63 if user == nil then
5
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
64 local url = "/login.html"
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
65 if not is_empty(with) then
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
66 local t = {}
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
67 for email in pairs(with) do
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
68 t[#t+1] = "with="..email
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
69 end
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
70 url = url.."?"..concat(t,"&")
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
71 end
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
72 Http.response.send_redirect(url)
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
73 return
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
74 end
8
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
75 local selected = nil
5
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
76 if not is_empty(with) then
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
77 with[user.email] = true
5
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
78 if size(with) > 1 then
8
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
79 selected = get_chat(with)
5
a49866b52cc2 login to chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 4
diff changeset
80 end
4
2da10ece826f add Chat
Franklin Schmidt <fschmidt@gmail.com>
parents: 3
diff changeset
81 end
35
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
82 local user_id = user.id
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
83 Io.stdout = Http.response.text_writer()
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
84 %>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
85 <!doctype html>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
86 <html>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
87 <head>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
88 <% head() %>
7
41d35b72c774 chat page
Franklin Schmidt <fschmidt@gmail.com>
parents: 5
diff changeset
89 <style>
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents: 9
diff changeset
90 @import "chat.css?s=<%=started%>";
7
41d35b72c774 chat page
Franklin Schmidt <fschmidt@gmail.com>
parents: 5
diff changeset
91 </style>
33
e2b7f6393dab add online
Franklin Schmidt <fschmidt@gmail.com>
parents: 30
diff changeset
92 <style online></style>
10
f9e6a4cc4f7d add Post
Franklin Schmidt <fschmidt@gmail.com>
parents: 9
diff changeset
93 <script src="chat.js?s=<%=started%>"></script>
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
94 </head>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
95 <body>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
96 <% header() %>
48
Franklin Schmidt <fschmidt@gmail.com>
parents: 46
diff changeset
97 <div chat_content show="chats">
7
41d35b72c774 chat page
Franklin Schmidt <fschmidt@gmail.com>
parents: 5
diff changeset
98 <div chats>
15
8b8905f63d80 add get_chats
Franklin Schmidt <fschmidt@gmail.com>
parents: 10
diff changeset
99 <% chats_html() %>
7
41d35b72c774 chat page
Franklin Schmidt <fschmidt@gmail.com>
parents: 5
diff changeset
100 </div>
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
101 <div posts>
56
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
102 <div intro>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
103 <h3>Choose a chat on the left</h3>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
104 <p>or</p>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
105 <h3>Chat with another person</h3>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
106 <form action="javascript:invite()">
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
107 <p>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
108 <label>Person's email</label><br>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
109 <input type=email name=email required><br>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
110 </p>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
111 <p>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
112 <input type=submit>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
113 </p>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
114 </form>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
115 </div>
34
Franklin Schmidt <fschmidt@gmail.com>
parents: 33
diff changeset
116 </div>
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
117 </div>
35
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
118 <div hidden>
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
119 <span pulldown>
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
120 <img onclick="clickMenu(this)" src="/images/more_vert.svg">
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
121 <div>
38
436216d17a1b fix edit and delete
Franklin Schmidt <fschmidt@gmail.com>
parents: 35
diff changeset
122 <span onclick="editPost(this)">Edit</span>
436216d17a1b fix edit and delete
Franklin Schmidt <fschmidt@gmail.com>
parents: 35
diff changeset
123 <span onclick="deletePost(this)">Delete</span>
35
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
124 </div>
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
125 </span>
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
126 </div>
20
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 17
diff changeset
127 <dialog delete_chat>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 17
diff changeset
128 <h2>Delete Chat</h2>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 17
diff changeset
129 <p>Are you sure that you want to delete this chat?</p>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 17
diff changeset
130 <div buttons>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 17
diff changeset
131 <button cancel onclick="closeModal(this)">Cancel</button>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 17
diff changeset
132 <button go onclick="doDeleteChat(this)">Delete</button>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 17
diff changeset
133 </div>
dade6a560494 add dialogs
Franklin Schmidt <fschmidt@gmail.com>
parents: 17
diff changeset
134 </dialog>
23
c54c806fcc6e add delete_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
135 <dialog delete_post>
c54c806fcc6e add delete_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
136 <h2>Delete Message</h2>
c54c806fcc6e add delete_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
137 <p>Are you sure that you want to delete this message?</p>
c54c806fcc6e add delete_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
138 <div buttons>
c54c806fcc6e add delete_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
139 <button cancel onclick="closeModal(this)">Cancel</button>
c54c806fcc6e add delete_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
140 <button go onclick="doDeletePost(this)">Delete</button>
c54c806fcc6e add delete_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
141 </div>
c54c806fcc6e add delete_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 21
diff changeset
142 </dialog>
24
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
143 <dialog edit_post>
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
144 <h2>Edit Message</h2>
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
145 <p><textarea onfocus="fixTextarea(event)" oninput="fixTextarea(event)"></textarea></p>
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
146 <div buttons>
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
147 <button cancel onclick="closeModal(this)">Cancel</button>
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
148 <button go onclick="savePost(this)">Save</button>
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
149 </div>
af41be2dcdec add edit_post
Franklin Schmidt <fschmidt@gmail.com>
parents: 23
diff changeset
150 </dialog>
56
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
151 <dialog invite>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
152 <h2>Chat with another person</h2>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
153 <p>We have sent an invite to <span email></span></p>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
154 <div buttons>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
155 <button cancel onclick="closeModal(this)">Close</button>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
156 </div>
323ddacc1593 start invite
Franklin Schmidt <fschmidt@gmail.com>
parents: 48
diff changeset
157 </dialog>
15
8b8905f63d80 add get_chats
Franklin Schmidt <fschmidt@gmail.com>
parents: 10
diff changeset
158 <script>
35
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
159 'use strict';
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
160
8
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
161 <%
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
162 if selected ~= nil then
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
163 %>
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
164 let div = document.querySelector('div[chat="<%=selected.id%>"]');
46
42b741a1d5c6 add username
Franklin Schmidt <fschmidt@gmail.com>
parents: 38
diff changeset
165 selectChat(div,<%=json_string(with_email)%>);
8
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
166 <%
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
167 end
Franklin Schmidt <fschmidt@gmail.com>
parents: 7
diff changeset
168 %>
35
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
169 setUserEventSource(<%=user_id%>);
30
f4708943f29e add heartbeat
Franklin Schmidt <fschmidt@gmail.com>
parents: 27
diff changeset
170 lastUpdate = <%=user.last_update()%>;
35
27c41f22d2a9 improve fixPosts
Franklin Schmidt <fschmidt@gmail.com>
parents: 34
diff changeset
171 userId = '<%=user_id%>';
15
8b8905f63d80 add get_chats
Franklin Schmidt <fschmidt@gmail.com>
parents: 10
diff changeset
172 </script>
8b8905f63d80 add get_chats
Franklin Schmidt <fschmidt@gmail.com>
parents: 10
diff changeset
173 </body>
0
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
174 </html>
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
175 <%
Franklin Schmidt <fschmidt@gmail.com>
parents:
diff changeset
176 end