merge
This commit is contained in:
parent
7c5d51157a
commit
01be7fdd12
@ -123,7 +123,7 @@ class PushService {
|
||||
/// 统一处理跳转逻辑
|
||||
static void _handleNotificationClick(String ext, {String? userID, String? groupID}) async {
|
||||
try {
|
||||
// ext={id:对应业务ID,type:'newFoucs',userID:发送人的id,groupID:群ID}
|
||||
// ext={id:对应业务ID,type:'newFocus',userID:发送人的id,groupID:群ID}
|
||||
// final ext = jsonEncode({
|
||||
// "userID": "123456",
|
||||
// "groupID": "654321",
|
||||
|
@ -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')) {
|
||||
|
@ -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':
|
||||
|
@ -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数据
|
||||
/// 名称firstFrameImg:先取cover,如果没有在取firstFrameImg
|
||||
case NotifyMessageTypeConstants.newFoucs:
|
||||
case NotifyMessageTypeConstants.newFocus:
|
||||
// 关注
|
||||
|
||||
///发起关注人的[userID],
|
||||
|
Loading…
x
Reference in New Issue
Block a user