This commit is contained in:
abu 2025-09-03 11:56:14 +08:00
parent 7c5d51157a
commit 01be7fdd12
4 changed files with 17 additions and 16 deletions

View File

@ -123,7 +123,7 @@ class PushService {
///
static void _handleNotificationClick(String ext, {String? userID, String? groupID}) async {
try {
// ext={id:ID,type:'newFoucs',userID:idgroupIDID}
// ext={id:ID,type:'newFocus',userID:idgroupIDID}
// final ext = jsonEncode({
// "userID": "123456",
// "groupID": "654321",

View File

@ -2,7 +2,7 @@
enum ConversationType {
noFriend, //
system, //
newFoucs, //
newFocus, //
interaction, //
order, //
groupNotify, //
@ -12,7 +12,7 @@ enum ConversationType {
class ConversationTypeStatic {
static const String noFriend = 'noFriend';
static const String system = 'system';
static const String newFoucs = 'newFoucs';
static const String newFocus = 'newFocus';
static const String interaction = 'interaction';
static const String order = 'order';
static const String groupNotify = 'groupNotify';
@ -25,8 +25,8 @@ extension ConversationTypeExtension on ConversationType {
return 'noFriend';
case ConversationType.system:
return 'system';
case ConversationType.newFoucs:
return 'newFoucs';
case ConversationType.newFocus:
return 'newFocus';
case ConversationType.interaction:
return 'interaction';
case ConversationType.order:
@ -44,8 +44,8 @@ conversationTypeFromString(String? type) {
return ConversationType.noFriend.name;
} else if (type.contains('system')) {
return ConversationType.system.name;
} else if (type.contains('newFoucs')) {
return ConversationType.newFoucs.name;
} else if (type.contains('newFocus')) {
return ConversationType.newFocus.name;
} else if (type.contains('interaction')) {
return ConversationType.interaction.name;
} else if (type.contains('order')) {

View File

@ -1,6 +1,6 @@
///
enum NotifyMessageType {
newFoucs, //
newFocus, //
systemNotify, // ->
systemReport, // ->
systemCheck, // ->
@ -20,7 +20,7 @@ enum NotifyMessageType {
///
class NotifyMessageTypeConstants {
static const String newFoucs = 'newFoucs';
static const String newFocus = 'newFocus';
static const String systemNotify = 'systemNotify';
static const String systemReport = 'systemReport';
static const String systemCheck = 'systemCheck';
@ -41,8 +41,8 @@ class NotifyMessageTypeConstants {
extension NotifyMessageTypeExtension on NotifyMessageType {
String get name {
switch (this) {
case NotifyMessageType.newFoucs:
return 'newFoucs';
case NotifyMessageType.newFocus:
return 'newFocus';
case NotifyMessageType.systemNotify:
return 'systemNotify';
case NotifyMessageType.systemReport:
@ -79,8 +79,8 @@ extension NotifyMessageTypeExtension on NotifyMessageType {
notifyMessageTypeFromString(String? type) {
switch (type) {
case 'newFoucs':
return NotifyMessageType.newFoucs.name;
case 'newFocus':
return NotifyMessageType.newFocus.name;
case 'systemNotify':
return NotifyMessageType.systemNotify.name;
case 'systemReport':

View File

@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:loopin/IM/im_service.dart';
import 'package:loopin/models/notify_message.type.dart';
import 'package:loopin/models/summary_type.dart';
import 'package:tencent_cloud_chat_sdk/enum/message_elem_type.dart';
@ -32,7 +33,7 @@ String parseMessageSummary(V2TimMessage msg) {
}
}
// newFoucs, //
// newFocus, //
// systemNotify, // ->
// systemReport, // ->
// systemCheck, // ->
@ -52,7 +53,7 @@ String _parseCustomMessage(V2TimMessage? msg) {
if (msg == null) return '[null]';
final sum = msg.cloudCustomData;
final elment = msg.customElem; //
// logger.w('解析自定义消息:${msg.toJson()}');
logger.w('解析自定义消息:$sum,自定义属性:${msg.cloudCustomData}');
// logger.w('解析element${elment?.desc ?? 'summary_error'}');
try {
switch (sum) {
@ -67,7 +68,7 @@ String _parseCustomMessage(V2TimMessage? msg) {
/// [des]
/// [data] json数据
/// firstFrameImgcoverfirstFrameImg
case NotifyMessageTypeConstants.newFoucs:
case NotifyMessageTypeConstants.newFocus:
//
///[userID],