-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReplyMsgArgs.cs
47 lines (38 loc) · 1.19 KB
/
ReplyMsgArgs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using Newtonsoft.Json;
namespace WhatsAppNETAPI
{
public class ReplyMsgArgs
{
public string send_to { get; set; }
public string message { get; set; }
public string type { get; set; }
public string timestamp { get; set; }
public string quotedMessageId { get; set; }
public string sessionId { get; set; }
public ReplyMsgArgs(string contact, Sticker sticker, string quotedMessageId)
{
send_to = contact;
message = JsonConvert.SerializeObject(sticker);
this.quotedMessageId = quotedMessageId;
type = "sticker";
timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
}
public ReplyMsgArgs(string contact, Location location, string quotedMessageId)
{
send_to = contact;
message = JsonConvert.SerializeObject(location);
this.quotedMessageId = quotedMessageId;
type = "location";
timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
}
public ReplyMsgArgs(string contact, string message, string quotedMessageId)
{
send_to = contact;
this.message = message;
this.quotedMessageId = quotedMessageId;
type = "text";
timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
}
}
}