Added Task Number filter
This commit is contained in:
+8
-7
@@ -140,9 +140,9 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
|
||||
message.data['actorId'] ??
|
||||
message.data['actor'])
|
||||
?.toString();
|
||||
if (taskNumber != null && taskNumber.isNotEmpty)
|
||||
if (taskNumber != null && taskNumber.isNotEmpty) {
|
||||
sb.write('tasknum:$taskNumber');
|
||||
else if (taskId != null && taskId.isNotEmpty)
|
||||
} else if (taskId != null && taskId.isNotEmpty)
|
||||
sb.write('task:$taskId');
|
||||
if (ticketId != null && ticketId.isNotEmpty) {
|
||||
if (sb.isNotEmpty) sb.write('|');
|
||||
@@ -318,14 +318,15 @@ Future<void> main() async {
|
||||
.maybeSingle();
|
||||
if (res != null) {
|
||||
String? name;
|
||||
if (res['full_name'] != null)
|
||||
if (res['full_name'] != null) {
|
||||
name = res['full_name'].toString();
|
||||
else if (res['display_name'] != null)
|
||||
} else if (res['display_name'] != null)
|
||||
name = res['display_name'].toString();
|
||||
else if (res['name'] != null)
|
||||
name = res['name'].toString();
|
||||
if (name != null && name.isNotEmpty)
|
||||
if (name != null && name.isNotEmpty) {
|
||||
dataForFormatting['actor_name'] = name;
|
||||
}
|
||||
}
|
||||
} catch (_) {
|
||||
// ignore lookup failures and fall back to data payload
|
||||
@@ -359,9 +360,9 @@ Future<void> main() async {
|
||||
message.data['actorId'] ??
|
||||
message.data['actor'])
|
||||
?.toString();
|
||||
if (taskNumber != null && taskNumber.isNotEmpty)
|
||||
if (taskNumber != null && taskNumber.isNotEmpty) {
|
||||
sb.write('tasknum:$taskNumber');
|
||||
else if (taskId != null && taskId.isNotEmpty)
|
||||
} else if (taskId != null && taskId.isNotEmpty)
|
||||
sb.write('task:$taskId');
|
||||
if (ticketId != null && ticketId.isNotEmpty) {
|
||||
if (sb.isNotEmpty) sb.write('|');
|
||||
|
||||
Reference in New Issue
Block a user