Adding command to send notification messages
parent
5b83e8c450
commit
7eb138c200
|
@ -13,6 +13,7 @@
|
||||||
- Improve the django admin panel, now it is more usable and all the selector fields works properly.
|
- Improve the django admin panel, now it is more usable and all the selector fields works properly.
|
||||||
- [API] Add tribe_gig field to user stories (improve integration between Taiga and Taiga Tribe).
|
- [API] Add tribe_gig field to user stories (improve integration between Taiga and Taiga Tribe).
|
||||||
- [API] Performance improvements for project stats.
|
- [API] Performance improvements for project stats.
|
||||||
|
- [Events] Add command to send an instant notifications to all the currently online users.
|
||||||
- Lots of small and not so small bugfixes.
|
- Lots of small and not so small bugfixes.
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +25,8 @@
|
||||||
- US, tasks and Issues can be upvoted or downvoted and the voters list can be obtained.
|
- US, tasks and Issues can be upvoted or downvoted and the voters list can be obtained.
|
||||||
- Now users can watch public issues, tasks and user stories.
|
- Now users can watch public issues, tasks and user stories.
|
||||||
- Add endpoints to show the watchers list for issues, tasks and user stories.
|
- Add endpoints to show the watchers list for issues, tasks and user stories.
|
||||||
- Add a "field type" property for custom fields: 'text', 'multiline text' and 'date' right now (thanks to [@artlepool](https://github.com/artlepool)).
|
- Add a "field type" property for custom fields: 'text', 'multiline text' and 'date' right nowi
|
||||||
|
(thanks to [@artlepool](https://github.com/artlepool)).
|
||||||
- Allow multiple actions in the commit messages.
|
- Allow multiple actions in the commit messages.
|
||||||
- Now every user that coments USs, Issues or Tasks will be involved in it (add author to the watchers list).
|
- Now every user that coments USs, Issues or Tasks will be involved in it (add author to the watchers list).
|
||||||
- Now profile timelines only show content about the objects (US/Tasks/Issues/Wiki pages) you are involved.
|
- Now profile timelines only show content about the objects (US/Tasks/Issues/Wiki pages) you are involved.
|
||||||
|
@ -50,7 +52,8 @@
|
||||||
- API: Improve and fix some errors in issues/filters_data and userstories/filters_data.
|
- API: Improve and fix some errors in issues/filters_data and userstories/filters_data.
|
||||||
- API: resolver suport ref GET param and return a story, task or issue.
|
- API: resolver suport ref GET param and return a story, task or issue.
|
||||||
- Webhooks: Add deleted datetime to webhooks responses when isues, tasks or USs are deleted.
|
- Webhooks: Add deleted datetime to webhooks responses when isues, tasks or USs are deleted.
|
||||||
- Add headers to allow threading for notification emails about changes to issues, tasks, user stories, and wiki pages. (thanks to [@brett](https://github.com/brettp)).
|
- Add headers to allow threading for notification emails about changes to issues, tasks, user stories,
|
||||||
|
and wiki pages. (thanks to [@brett](https://github.com/brettp)).
|
||||||
- Lots of small and not so small bugfixes.
|
- Lots of small and not so small bugfixes.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.be>
|
||||||
|
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
|
||||||
|
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from django.core.management.base import BaseCommand
|
||||||
|
|
||||||
|
from taiga.events.events import emit_event
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
help = 'Send a notification message to the current users'
|
||||||
|
|
||||||
|
def add_arguments(self, parser):
|
||||||
|
parser.add_argument("title", help="The title of the message.")
|
||||||
|
parser.add_argument("description", help="The description of the message.")
|
||||||
|
|
||||||
|
def handle(self, **options):
|
||||||
|
data = {
|
||||||
|
"title": options["title"],
|
||||||
|
"desc": options["description"],
|
||||||
|
}
|
||||||
|
routing_key = "notifications"
|
||||||
|
emit_event(data, routing_key)
|
Loading…
Reference in New Issue