userid
This commit is contained in:
parent
27cad2827c
commit
09d786087e
1
main.go
1
main.go
@ -11,6 +11,7 @@ import (
|
||||
)
|
||||
|
||||
type ChatWarsMessage struct {
|
||||
UserID64 int64 `json:"user_id"`
|
||||
SenderUserID64 int64 `json:"sender_user_id"`
|
||||
Date int32 `json:"date"`
|
||||
ID64 int64 `json:"id"`
|
||||
|
3
td.go
3
td.go
@ -35,6 +35,7 @@ func ListenCW(c *tdlib.Client) {
|
||||
t := time.Now()
|
||||
|
||||
m := ChatWarsMessage{
|
||||
UserID64: ownUserID64,
|
||||
SenderUserID64: int64(updateMsg.Message.SenderUserID),
|
||||
Date: updateMsg.Message.Date,
|
||||
ID64: updateMsg.Message.ID,
|
||||
@ -112,6 +113,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
|
||||
case tdlib.MessageTextType:
|
||||
if msg.ForwardInfo == nil {
|
||||
m = ChatWarsMessage{
|
||||
UserID64: ownUserID64,
|
||||
SenderUserID64: int64(msg.SenderUserID),
|
||||
Date: msg.Date,
|
||||
ID64: msg.ID,
|
||||
@ -121,6 +123,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) {
|
||||
} else {
|
||||
if msg.ForwardInfo.GetMessageForwardInfoEnum() == tdlib.MessageForwardedFromUserType {
|
||||
m = ChatWarsMessage{
|
||||
UserID64: int64(msg.SenderUserID),
|
||||
SenderUserID64: int64(msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).SenderUserID),
|
||||
Date: msg.ForwardInfo.(*tdlib.MessageForwardedFromUser).Date,
|
||||
ID64: msg.ID,
|
||||
|
Loading…
Reference in New Issue
Block a user