Commit Graph

451 Commits

Author SHA1 Message Date
gildarts dfd9ab1c61 add database stamp for core.sr.ht 2020-08-11 10:46:56 -04:00
Drew DeVault 9450ca6437 API: ticket by ID: abort 404 if no ticket 2020-08-10 12:29:32 -04:00
наб 79212efcc4 Allow 50-character labels, as the error message suggests
Ref: ~sircmpwn/todo.sr.ht#181
2020-08-10 10:22:59 -04:00
наб 732093c1c0 Check that current_user before using it and crashing when searching 2020-08-06 09:15:45 -04:00
наб 0ac0859f4d Don't suggest submitter:me if not logged in 2020-08-06 09:15:45 -04:00
Drew DeVault 9554487777 Settings import: abort(400) on invalid dump 2020-08-05 16:32:27 -04:00
наб caaab0c2c1 Show subscription mailto: links to anonymous users
As suggested in <C4DCAJR6LQD2.GBNNZ1ME6L4N@homura>
2020-07-30 08:52:18 -04:00
наб ce2683189f Match "{En,Dis}able notifications" capitalisation in ticket to tracker's 2020-07-27 15:08:44 -04:00
наб 613933a49c Wrap valid punctuation in tracker creation error in <samp>s
They were pretty hard to notice and read otherwise
2020-07-22 13:19:57 -04:00
наб a7bc3191ff Add List-Unsubscribe: mailto:{sub.ref}/unsubscribe to notifications 2020-07-22 13:19:57 -04:00
наб b7b5abb83a Allow (un)subscribing by mailing ~u/t[/1]/[un]subscribe 2020-07-22 13:19:56 -04:00
наб 4270950afe Add Tracker.ref() à la Ticket.ref(), replacing manual construxions 2020-07-22 13:19:56 -04:00
наб eff4ea1d86 Don't reacquire participant in ~u/t/enable_notifications handler 2020-07-22 13:19:55 -04:00
наб eec8eb5fa0 Fix e-mail ticket submission not notifying the submitter
To reproduce, the setup:
  * run todo.sr.ht-lmtp,
    listen on sock=127.0.0.1:2525,
    with posting-domain=todo.nabijaczleweli.xyz
  * register users:
    + ~nabijaczleweli  <nabijaczleweli/srht/test@nabijaczleweli.xyz>
    + ~nabijaczleweli2 <nabijaczleweli/srht/test2@nabijaczleweli.xyz>
  * create tracker "~nabijaczleweli/test", potentially unsubscribe
  * do not subscribe ~nabijaczleweli2 to that tracker

Now, run
-- >8 --
$ telnet 127.0.0.1 2525
ehlo owo
mail from:<nabijaczleweli/srht/test2@nabijaczleweli.xyz>
rcpt to:<~nabijaczleweli/test@todo.nabijaczleweli.xyz>
data
From: nabijaczleweli/srht/test2@nabijaczleweli.xyz
To: ~nabijaczleweli/test@todo.nabijaczleweli.xyz
Subject: Repro

This will not be delivered to nabijaczleweli2

.
quit
-- >8 --

If you didn't unsubscribe, ~nabijaczleweli will get the e-mail;
either way, ~nabijaczleweli2 won't receive it.
This goes against the intent of 6599be5371

This happens because in submit_ticket() tracker.subscriptions is either
empty or contains just ~nabijaczleweli; concatenating it with
ticket.subscriptions allows picking up the potential new sub created by
get_or_create_subscription().

With this patch, delivering that same mail will also notify
~nabijaczleweli2.

This fixes the problem described in
https://lists.sr.ht/~sircmpwn/sr.ht-dev/%3C20200714151756.gxmowmpohmtps76h@tarta.local.nabijaczleweli.xyz%3E
2020-07-20 08:43:04 -04:00
Drew DeVault 6e438d993b Fix extra space in ticket ID link 2020-07-17 10:11:48 -04:00
наб 8a3c9b63b9 Include an In-Reply-To: <Message-ID of triggering e-mail>, if any, in the new_ticket notification 2020-07-17 09:59:49 -04:00
наб d14758e1d8 Tracker export doc: registered users' e-mailed submissions *are* signed 2020-07-16 09:03:59 -04:00
Drew DeVault eed8f8f697 API: add integer specification to route params 2020-07-06 12:47:05 -04:00
Drew DeVault e101e7eeca Utilize srht.cache instead of direct Redis access
This also removes some outdated dependencies in setup.py that were found
while grepping around for redis use-cases.
2020-06-29 10:41:12 -04:00
Drew DeVault 94c954f75e Alpine: upgrade to 3.12 2020-06-15 12:44:22 -06:00
Drew DeVault a61e9e73a2 access: fix code path which returns none 2020-06-10 19:20:15 -04:00
Drew DeVault a72c3378f6 access: accept User type in get_tracker 2020-06-08 13:57:07 -04:00
Benjamin Lowry 095e199d3e redirect to correct page when creating & configuring tracker
Use canonical_name to redirect to the tracker page with
a tilde before the username.

Signed-off-by: Benjamin Lowry <ben@ben.gmbh>
2020-06-08 13:42:39 -04:00
Benjamin Lowry 697b7ae0bf get_tracker: return None if tilde is ommitted
This makes the behavior consistent with other sr.ht services

Signed-off-by: Benjamin Lowry <ben@ben.gmbh>
2020-06-08 13:42:38 -04:00
Gabriel Augendre 6599be5371 Notify sender for tickets created by email.
Fix ticket ~sircmpwn/todo.sr.ht/180
2020-06-08 13:42:37 -04:00
René Wagner fcf5cf218d fixes ~sircmpwn/todo.sr.ht#216: allow preview for comments for all tickets a user is allowed to comment 2020-05-25 10:16:07 -04:00
Ivan Habunek 6ac582e3b6 Add preview when editing tickets 2020-05-22 15:47:23 -04:00
Ivan Habunek 5a123a5872 Add preview when creating tickets 2020-05-22 15:47:23 -04:00
Drew DeVault 4fc244d3ea tracker: allow 2 character labels 2020-05-20 14:35:48 -04:00
Eli Schwartz 0f87ec7453 setup.py: use importlib.resources from python 3.7 to find core.sr.ht Makefile
importlib.resources will guarantee to find any importable module, and
check that the resource ('Makefile') can be found within it.

This lets us get rid of the current getsitepackages() hack and
environment variable fallback, which is both verbose and badly handles
some edge cases when installing modules, and instead use the recommended
way to find data files shipped with a python module.
2020-05-11 09:44:26 -04:00
Drew DeVault 5dbc2a862d API: set default ticket description to empty string 2020-05-05 11:53:21 -04:00
Drew DeVault 812fdafd40 API: reuse tracker deletion hack from web UI 2020-05-05 11:44:51 -04:00
Drew DeVault 861b1dbc6c API: don't require description for new tickets
This matches the behavior of the web UI.
2020-05-05 11:30:57 -04:00
Drew DeVault 4db7a329a2 api: include ticket subject in short form 2020-04-24 11:10:34 -04:00
Matt Singletary ff14d6502f Add label to search box
Use sr-only to not mess with (visible) design
2020-04-24 11:10:05 -04:00
Drew DeVault 0a30060cb4 todosrht-lmtp: alias !resolved as !resolve 2020-04-05 09:50:10 -04:00
Drew DeVault f1162e7477 Add tracker ID to API response 2020-04-02 09:18:06 -04:00
Drew DeVault 5ca816a2ae Fix markup cache invalidation 2020-03-31 11:51:24 -04:00
Drew DeVault c6060b6707 Incorporate markdown version in cache key 2020-03-30 11:04:44 -04:00
Drew DeVault 5f745f7705 Correct layout of header nav 2020-03-30 10:15:39 -04:00
Drew DeVault fe5e2d48ac todosrht-initdb: import webhook types 2020-03-28 16:34:46 -04:00
Drew DeVault fcc0ae031b Add todosrht-initdb 2020-03-26 09:05:34 -04:00
Drew DeVault dd416c6a59 Responsiveness improvements 2020-03-10 11:07:56 -04:00
Drew DeVault 6a920745a8 Update permissions for todo.sr.ht views
Similar to the recent lists.sr.ht fix.
2020-03-02 14:41:10 -05:00
Drew DeVault 6fb8715938 API: fix invalid reference to TicketStatus.open
The appropriate field is TicketStatus.reported
2020-02-15 14:34:45 -05:00
Ivan Habunek d761b6551e Test search logic 2020-02-11 11:58:18 -05:00
Ivan Habunek 7f0ba0bcb0 Refactor search to work with new core search code
Implements inverse searches using !, adds status:any, and some
optimizations.
2020-02-11 11:58:17 -05:00
Ivan Habunek e885f90876 Handle search errors 2020-02-11 11:58:16 -05:00
Ivan Habunek 7f9f1d0f66 Fix ParticipantFactory 2020-02-11 11:58:14 -05:00
Drew DeVault ae41a24ad2 Remove extraneous spaces from links 2020-01-22 18:29:13 -05:00