mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Add two-way messaging view
> Once an inbound message has been received, there should be a way to > see the other messages in the system from the same service to the same > number. Both in and outbound. Nice inbox/whatsapp stylee view or some > such. This way the context of the reply is understood. > > Initially will only see the outbound template, not the actual message, > but we’re going to change this for the rest (soon), so that you can > always see the full message for all outbound.
This commit is contained in:
@@ -54,3 +54,8 @@ class NotificationApiClient(NotifyAdminAPIClient):
|
||||
url='/service/{}/notifications'.format(service_id),
|
||||
params=params
|
||||
)
|
||||
|
||||
def get_notification(self, service_id, notification_id):
|
||||
return self.get(
|
||||
url='/service/{}/notifications/{}'.format(service_id, notification_id)
|
||||
)
|
||||
|
||||
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
||||
from flask import url_for
|
||||
from app.utils import BrowsableItem
|
||||
from app.notify_client import _attach_current_user, NotifyAdminAPIClient
|
||||
from . import notification_api_client
|
||||
|
||||
|
||||
class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
@@ -244,11 +245,22 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
params=dict(year=year)
|
||||
)
|
||||
|
||||
def get_inbound_sms(self, service_id):
|
||||
def get_inbound_sms(self, service_id, user_number=''):
|
||||
return self.get(
|
||||
'/service/{}/inbound-sms'.format(service_id)
|
||||
'/service/{}/inbound-sms?user_number={}'.format(
|
||||
service_id,
|
||||
user_number,
|
||||
)
|
||||
)['data']
|
||||
|
||||
def get_inbound_sms_by_id(self, service_id, notification_id):
|
||||
return self.get(
|
||||
'/service/{}/inbound-sms/{}'.format(
|
||||
service_id,
|
||||
notification_id,
|
||||
)
|
||||
)
|
||||
|
||||
def get_inbound_sms_summary(self, service_id):
|
||||
return self.get(
|
||||
'/service/{}/inbound-sms/summary'.format(service_id)
|
||||
|
||||
Reference in New Issue
Block a user