You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Make experiments generic
* Show experiments
* Extra sections html
* Restore sections
* a
* mm
* Show unavailability
* b
* file
* Label changes
* Types for in suggestion calls
* ab
* Reuse for backing calls
Copy file name to clipboardexpand all lines: src/Server/sql/index.sql
+24-1
Original file line number
Diff line number
Diff line change
@@ -343,6 +343,28 @@ language plpgsql;
343
343
344
344
createtriggerrecent_edit_boom after insert on complete_profiles for each row execute function temporarily_place_at_top();
345
345
346
+
create or replacefunctionunread_for
347
+
(dt timestamptz) returns intas
348
+
$$
349
+
declare minutes int= (extract(epoch from (utc_now() - dt)) /60);
350
+
begin
351
+
if (minutes <=10) then
352
+
return 0;
353
+
end if;
354
+
if (minutes >60and minutes <=70) then
355
+
return 1;
356
+
end if;
357
+
if (minutes >60*24and minutes <=60*24+10) then
358
+
return 2;
359
+
end if;
360
+
if (minutes >60*24*30and minutes <=60*24*30+10) then
361
+
return 3;
362
+
end if;
363
+
return 1000;
364
+
end;
365
+
$$
366
+
language plpgsql;
367
+
346
368
create or replacefunctioninsert_history
347
369
(sender_id int, recipient_id int) returns void as
348
370
$$
@@ -701,7 +723,8 @@ values
701
723
('Zimbabwe');
702
724
703
725
insert into experiments (code, name, description) values
704
-
(0, 'Impersonation', 'Temporarily change your profile to a character, famous person or historical figure so you can chat as if it was the same person typing it');
726
+
(0, 'Impersonation', 'Temporarily change your profile to a character, famous person or historical figure so you can chat as if it was the same person typing it'),
727
+
(10, 'Word chain', 'Play Word Chain with other users');
705
728
706
729
insert into stock_text (contents, text_type) values
707
730
('I stayed up all night wondering where the sun went, then it dawned on me', 0),
0 commit comments