Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix: fixed wx-pusher send message result value type #942

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,12 @@ public SendMessage(
MessageContentType contentType = MessageContentType.Text,
string url = "")
{
Check.NotNullOrWhiteSpace(appToken, nameof(appToken));
Check.NotNullOrWhiteSpace(content, nameof(content));
Check.Length(summary, nameof(summary), 100);

AppToken = appToken;
Content = content;
Summary = summary;
AppToken = Check.NotNullOrWhiteSpace(appToken, nameof(appToken));
// 单条消息的数据长度(字符数)限制是:content<40000;summary<20(微信的限制,大于20显示不完);url<400
Content = Check.NotNullOrWhiteSpace(content, nameof(content), 39999);
Summary = Check.Length(summary, nameof(summary), 19);
Url = Check.Length(url, nameof(url), 399);
ContentType = contentType;
Url = url;

TopicIds = new List<int>();
Uids = new List<string>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,25 @@ public class SendMessageResult
/// 消息标识
/// </summary>
[JsonProperty("messageId")]
public long MessageId { get; set; }
[Obsolete("废弃,请不要再使用,后续会删除这个字段, see: https://wxpusher.dingliqc.com/docs/#/?id=%e5%8f%91%e9%80%81%e6%b6%88%e6%81%af")]
public long? MessageId { get; set; }
/// <summary>
/// 消息内容标识
/// </summary>
/// <remarks>
/// 调用一次接口,生成一个,你可以通过此id调用删除消息接口,删除消息。
/// 本次发送的所有用户共享此消息内容。
/// </remarks>
[JsonProperty("messageContentId")]
public long ContentId { get; set; }
/// <summary>
/// 消息发送标识
/// </summary>
/// <remarks>
/// 每个uid用户或者topicId生成一个,可以通过这个id查询对某个用户的发送状态
/// </remarks>
[JsonProperty("sendRecordId")]
public long RecordId { get; set; }
/// <summary>
/// 状态
/// </summary>
Expand All @@ -30,7 +48,7 @@ public class SendMessageResult
/// 群组标识
/// </summary>
[JsonProperty("topicId")]
public string TopicId { get; set; }
public long? TopicId { get; set; }
/// <summary>
/// 是否调用成功
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ public class UserProfile
[JsonProperty("uid")]
public string Uid { get; set; }
/// <summary>
/// 用户关注的应用或者主题id,根据type来区分
/// </summary>
[JsonProperty("appOrTopicId")]
public long? AppOrTopicId { get; set; }
/// <summary>
/// 新用户微信不再返回 ,强制返回空
/// </summary>
[JsonProperty("headImg")]
Expand Down Expand Up @@ -48,4 +53,9 @@ public class UserProfile
/// </summary>
[JsonProperty("target")]
public string Target { get; set; }
/// <summary>
/// 0表示用户不是付费用户,大于0表示用户付费订阅到期时间,毫秒级时间戳
/// </summary>
[JsonProperty("payEndTime")]
public long PayEndTime { get; set; }
}
Loading