rpc

package
v0.0.0-...-6e21e7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupUpdatesState

func SetupUpdatesState(state *mtproto.ClientUpdatesState, updates *mtproto.TLUpdates) *mtproto.TLUpdates

TODO(@benqi): check error

Types

type MessagesServiceImpl

type MessagesServiceImpl struct {
}

func (*MessagesServiceImpl) MessagesAcceptEncryption

func (s *MessagesServiceImpl) MessagesAcceptEncryption(ctx context.Context, request *mtproto.TLMessagesAcceptEncryption) (*mtproto.EncryptedChat, error)

messages.acceptEncryption#3dbc0415 peer:InputEncryptedChat g_b:bytes key_fingerprint:long = EncryptedChat;

func (*MessagesServiceImpl) MessagesAddChatUser

func (s *MessagesServiceImpl) MessagesAddChatUser(ctx context.Context, request *mtproto.TLMessagesAddChatUser) (*mtproto.Updates, error)

messages.addChatUser#f9a0aa09 chat_id:int user_id:InputUser fwd_limit:int = Updates;

func (*MessagesServiceImpl) MessagesCheckChatInvite

func (s *MessagesServiceImpl) MessagesCheckChatInvite(ctx context.Context, request *mtproto.TLMessagesCheckChatInvite) (*mtproto.ChatInvite, error)

messages.checkChatInvite#3eadb1bb hash:string = ChatInvite;

func (*MessagesServiceImpl) MessagesClearRecentStickers

func (s *MessagesServiceImpl) MessagesClearRecentStickers(ctx context.Context, request *mtproto.TLMessagesClearRecentStickers) (*mtproto.Bool, error)

messages.clearRecentStickers#8999602d flags:# attached:flags.0?true = Bool;

func (*MessagesServiceImpl) MessagesCreateChat

func (s *MessagesServiceImpl) MessagesCreateChat(ctx context.Context, request *mtproto.TLMessagesCreateChat) (*mtproto.Updates, error)

messages.createChat#9cb126e users:Vector<InputUser> title:string = Updates;

func (*MessagesServiceImpl) MessagesDeleteChatUser

func (s *MessagesServiceImpl) MessagesDeleteChatUser(ctx context.Context, request *mtproto.TLMessagesDeleteChatUser) (*mtproto.Updates, error)

messages.deleteChatUser#e0611f16 chat_id:int user_id:InputUser = Updates;

func (*MessagesServiceImpl) MessagesDeleteHistory

messages.deleteHistory#1c015b09 flags:# just_clear:flags.0?true peer:InputPeer max_id:int = messages.AffectedHistory;

func (*MessagesServiceImpl) MessagesDeleteMessages

messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> = messages.AffectedMessages;

func (*MessagesServiceImpl) MessagesDiscardEncryption

func (s *MessagesServiceImpl) MessagesDiscardEncryption(ctx context.Context, request *mtproto.TLMessagesDiscardEncryption) (*mtproto.Bool, error)

messages.discardEncryption#edd923c5 chat_id:int = Bool;

func (*MessagesServiceImpl) MessagesEditChatAdmin

func (s *MessagesServiceImpl) MessagesEditChatAdmin(ctx context.Context, request *mtproto.TLMessagesEditChatAdmin) (*mtproto.Bool, error)

messages.editChatAdmin#a9e69f2e chat_id:int user_id:InputUser is_admin:Bool = Bool;

func (*MessagesServiceImpl) MessagesEditChatPhoto

func (s *MessagesServiceImpl) MessagesEditChatPhoto(ctx context.Context, request *mtproto.TLMessagesEditChatPhoto) (*mtproto.Updates, error)
body: { messages_editChatPhoto
  chat_id: 283362015 [INT],
  photo: { inputChatUploadedPhoto
	file: { inputFile
	  id: 970161873153942262 [LONG],
	  parts: 9 [INT],
	  name: ".jpg" [STRING],
	  md5_checksum: "f1987132d8a3949420f0130d9e6afe08" [STRING],
	},
  },
},

messages.editChatPhoto#ca4c79d8 chat_id:int photo:InputChatPhoto = Updates;

func (*MessagesServiceImpl) MessagesEditChatTitle

func (s *MessagesServiceImpl) MessagesEditChatTitle(ctx context.Context, request *mtproto.TLMessagesEditChatTitle) (*mtproto.Updates, error)

messages.editChatTitle#dc452855 chat_id:int title:string = Updates;

func (*MessagesServiceImpl) MessagesEditInlineBotMessage

func (s *MessagesServiceImpl) MessagesEditInlineBotMessage(ctx context.Context, request *mtproto.TLMessagesEditInlineBotMessage) (*mtproto.Bool, error)

messages.editInlineBotMessage#b0e08243 flags:# no_webpage:flags.1?true stop_geo_live:flags.12?true id:InputBotInlineMessageID message:flags.11?string reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> geo_point:flags.13?InputGeoPoint = Bool;

func (*MessagesServiceImpl) MessagesEditMessage

func (s *MessagesServiceImpl) MessagesEditMessage(ctx context.Context, request *mtproto.TLMessagesEditMessage) (*mtproto.Updates, error)

messages.editMessage#5d1b8dd flags:# no_webpage:flags.1?true stop_geo_live:flags.12?true peer:InputPeer id:int message:flags.11?string reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> geo_point:flags.13?InputGeoPoint = Updates;

func (*MessagesServiceImpl) MessagesExportChatInvite

messages.exportChatInvite#7d885289 chat_id:int = ExportedChatInvite;

func (*MessagesServiceImpl) MessagesFaveSticker

func (s *MessagesServiceImpl) MessagesFaveSticker(ctx context.Context, request *mtproto.TLMessagesFaveSticker) (*mtproto.Bool, error)

messages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool;

func (*MessagesServiceImpl) MessagesForwardMessage

func (s *MessagesServiceImpl) MessagesForwardMessage(ctx context.Context, request *mtproto.TLMessagesForwardMessage) (*mtproto.Updates, error)

@benqi: android和pc客户端未发现会发送此消息 messages.forwardMessage#33963bf9 peer:InputPeer id:int random_id:long = Updates;

func (*MessagesServiceImpl) MessagesForwardMessages

func (s *MessagesServiceImpl) MessagesForwardMessages(ctx context.Context, request *mtproto.TLMessagesForwardMessages) (*mtproto.Updates, error)

messages.forwardMessages#708e0195 flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true grouped:flags.9?true from_peer:InputPeer id:Vector<int> random_id:Vector<long> to_peer:InputPeer = Updates;

func (*MessagesServiceImpl) MessagesGetAllChats

func (s *MessagesServiceImpl) MessagesGetAllChats(ctx context.Context, request *mtproto.TLMessagesGetAllChats) (*mtproto.Messages_Chats, error)

messages.getAllChats#eba80ff0 except_ids:Vector<int> = messages.Chats;

func (*MessagesServiceImpl) MessagesGetAllDrafts

func (s *MessagesServiceImpl) MessagesGetAllDrafts(ctx context.Context, request *mtproto.TLMessagesGetAllDrafts) (*mtproto.Updates, error)

messages.getAllDrafts#6a3f8d65 = Updates;

func (*MessagesServiceImpl) MessagesGetAllStickers

messages.getAllStickers#1c9618b1 hash:int = messages.AllStickers;

func (*MessagesServiceImpl) MessagesGetArchivedStickers

messages.getArchivedStickers#57f17692 flags:# masks:flags.0?true offset_id:long limit:int = messages.ArchivedStickers;

func (*MessagesServiceImpl) MessagesGetAttachedStickers

messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector<StickerSetCovered>;

func (*MessagesServiceImpl) MessagesGetBotCallbackAnswer

messages.getBotCallbackAnswer#810a9fec flags:# game:flags.1?true peer:InputPeer msg_id:int data:flags.0?bytes = messages.BotCallbackAnswer;

func (*MessagesServiceImpl) MessagesGetChats

messages.getChats#3c6aa187 id:Vector<int> = messages.Chats;

func (*MessagesServiceImpl) MessagesGetCommonChats

func (s *MessagesServiceImpl) MessagesGetCommonChats(ctx context.Context, request *mtproto.TLMessagesGetCommonChats) (*mtproto.Messages_Chats, error)

messages.getCommonChats#d0a48c4 user_id:InputUser max_id:int limit:int = messages.Chats;

func (*MessagesServiceImpl) MessagesGetDhConfig

request:
{ messages_getDhConfig
  version: 0 [INT],
  random_length: 256 [INT],
}

reply:
{ messages_dhConfig
	g: 3 [INT],
	p: C7 1C AE B9 C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73... [256 BYTES],
	version: 3 [INT],
	random: F1 2A FB 6B 97 B6 0A 17 B9 3E 2F 65 28 33 4D 03... [256 BYTES],
}

messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig;

func (*MessagesServiceImpl) MessagesGetDialogs

android client request source code

TLRPC.TL_messages_getDialogs req = new TLRPC.TL_messages_getDialogs();
req.limit = count;
req.exclude_pinned = true;
if (UserConfig.dialogsLoadOffsetId != -1) {
	if (UserConfig.dialogsLoadOffsetId == Integer.MAX_VALUE) {
		dialogsEndReached = true;
		serverDialogsEndReached = true;
		loadingDialogs = false;
		NotificationCenter.getInstance().postNotificationName(NotificationCenter.dialogsNeedReload);
		return;
	}
	req.offset_id = UserConfig.dialogsLoadOffsetId;
	req.offset_date = UserConfig.dialogsLoadOffsetDate;
	if (req.offset_id == 0) {
		req.offset_peer = new TLRPC.TL_inputPeerEmpty();
	} else {
		if (UserConfig.dialogsLoadOffsetChannelId != 0) {
			req.offset_peer = new TLRPC.TL_inputPeerChannel();
			req.offset_peer.channel_id = UserConfig.dialogsLoadOffsetChannelId;
		} else if (UserConfig.dialogsLoadOffsetUserId != 0) {
			req.offset_peer = new TLRPC.TL_inputPeerUser();
			req.offset_peer.user_id = UserConfig.dialogsLoadOffsetUserId;
		} else {
			req.offset_peer = new TLRPC.TL_inputPeerChat();
			req.offset_peer.chat_id = UserConfig.dialogsLoadOffsetChatId;
		}
		req.offset_peer.access_hash = UserConfig.dialogsLoadOffsetAccess;
	}
} else {
	boolean found = false;
	for (int a = dialogs.size() - 1; a >= 0; a--) {
		TLRPC.TL_dialog dialog = dialogs.get(a);
		if (dialog.pinned) {
			continue;
		}
		int lower_id = (int) dialog.id;
		int high_id = (int) (dialog.id >> 32);
		if (lower_id != 0 && high_id != 1 && dialog.top_message > 0) {
			MessageObject message = dialogMessage.get(dialog.id);
			if (message != null && message.getId() > 0) {
				req.offset_date = message.messageOwner.date;
				req.offset_id = message.messageOwner.id;
				int id;
				if (message.messageOwner.to_id.channel_id != 0) {
					id = -message.messageOwner.to_id.channel_id;
				} else if (message.messageOwner.to_id.chat_id != 0) {
					id = -message.messageOwner.to_id.chat_id;
				} else {
					id = message.messageOwner.to_id.user_id;
				}
				req.offset_peer = getInputPeer(id);
				found = true;
				break;
			}
		}
	}
	if (!found) {
		req.offset_peer = new TLRPC.TL_inputPeerEmpty();
	}
}

由客户端代码: offset_id为当前用户最后一条消息ID,offset_peer为最后一条消息的接收者peer offset_date messages.getDialogs#191ba9c5 flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int = messages.Dialogs;

func (*MessagesServiceImpl) MessagesGetDocumentByHash

func (s *MessagesServiceImpl) MessagesGetDocumentByHash(ctx context.Context, request *mtproto.TLMessagesGetDocumentByHash) (*mtproto.Document, error)

messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document;

func (*MessagesServiceImpl) MessagesGetFavedStickers

messages.getFavedStickers#21ce0b0e hash:int = messages.FavedStickers;

func (*MessagesServiceImpl) MessagesGetFeaturedStickers

messages.getFeaturedStickers#2dacca4f hash:int = messages.FeaturedStickers;

func (*MessagesServiceImpl) MessagesGetFullChat

messages.getFullChat#3b831c66 chat_id:int = messages.ChatFull;

func (*MessagesServiceImpl) MessagesGetGameHighScores

messages.getGameHighScores#e822649d peer:InputPeer id:int user_id:InputUser = messages.HighScores;

func (*MessagesServiceImpl) MessagesGetHistory

request: {"peer":{"constructor":2072935910,"data2":{"user_id":5,"access_hash":1006843769775067136}},"offset_id":1,"add_offset":-25,"limit":50} request: {"peer":{"constructor":2072935910,"data2":{"user_id":4,"access_hash":405858233924775823}},"offset_id":2147483647,"offset_date":2147483647,"limit":1,"max_id":2147483647,"min_id":1} request: {"peer":{"constructor":2072935910,"data2":{"user_id":4,"access_hash":405858233924775823}},"offset_id":2147483647,"offset_date":2147483647,"limit":1,"max_id":2147483647,"min_id":1} messages.getHistory#dcbb8260 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages;

func (*MessagesServiceImpl) MessagesGetHistoryLayer71

func (s *MessagesServiceImpl) MessagesGetHistoryLayer71(ctx context.Context, request *mtproto.TLMessagesGetHistoryLayer71) (*mtproto.Messages_Messages, error)

request: {"peer":{"constructor":2072935910,"data2":{"user_id":4,"access_hash":405858233924775823}},"offset_id":2147483647,"offset_date":2147483647,"limit":1,"max_id":2147483647,"min_id":1} request: {"peer":{"constructor":2072935910,"data2":{"user_id":4,"access_hash":405858233924775823}},"offset_id":2147483647,"offset_date":2147483647,"limit":1,"max_id":2147483647,"min_id":1} messages.getHistory#afa92846 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;

func (*MessagesServiceImpl) MessagesGetInlineBotResults

messages.getInlineBotResults#514e999d flags:# bot:InputUser peer:InputPeer geo_point:flags.0?InputGeoPoint query:string offset:string = messages.BotResults;

func (*MessagesServiceImpl) MessagesGetInlineGameHighScores

func (s *MessagesServiceImpl) MessagesGetInlineGameHighScores(ctx context.Context, request *mtproto.TLMessagesGetInlineGameHighScores) (*mtproto.Messages_HighScores, error)

messages.getInlineGameHighScores#f635e1b id:InputBotInlineMessageID user_id:InputUser = messages.HighScores;

func (*MessagesServiceImpl) MessagesGetMaskStickers

messages.getMaskStickers#65b8c79f hash:int = messages.AllStickers;

func (*MessagesServiceImpl) MessagesGetMessageEditData

messages.getMessageEditData#fda68d36 peer:InputPeer id:int = messages.MessageEditData;

func (*MessagesServiceImpl) MessagesGetMessages

messages.getMessages#4222fa74 id:Vector<int> = messages.Messages;

func (*MessagesServiceImpl) MessagesGetMessagesViews

func (s *MessagesServiceImpl) MessagesGetMessagesViews(ctx context.Context, request *mtproto.TLMessagesGetMessagesViews) (*mtproto.VectorInt, error)

messages.getMessagesViews#c4c8a55d peer:InputPeer id:Vector<int> increment:Bool = Vector<int>;

func (*MessagesServiceImpl) MessagesGetPeerDialogs

messages.getPeerDialogs#2d9776b9 peers:Vector<InputPeer> = messages.PeerDialogs;

func (*MessagesServiceImpl) MessagesGetPeerSettings

func (s *MessagesServiceImpl) MessagesGetPeerSettings(ctx context.Context, request *mtproto.TLMessagesGetPeerSettings) (*mtproto.PeerSettings, error)

messages.getPeerSettings#3672e09c peer:InputPeer = PeerSettings;

func (*MessagesServiceImpl) MessagesGetPinnedDialogs

messages.getPinnedDialogs#e254d64e = messages.PeerDialogs;

func (*MessagesServiceImpl) MessagesGetRecentLocations

func (s *MessagesServiceImpl) MessagesGetRecentLocations(ctx context.Context, request *mtproto.TLMessagesGetRecentLocations) (*mtproto.Messages_Messages, error)

messages.getRecentLocations#249431e2 peer:InputPeer limit:int = messages.Messages;

func (*MessagesServiceImpl) MessagesGetRecentStickers

messages.getRecentStickers#5ea192c9 flags:# attached:flags.0?true hash:int = messages.RecentStickers;

func (*MessagesServiceImpl) MessagesGetSavedGifs

messages.getSavedGifs#83bf3d52 hash:int = messages.SavedGifs;

func (*MessagesServiceImpl) MessagesGetStickerSet

messages.getStickerSet#2619a90e stickerset:InputStickerSet = messages.StickerSet;

func (*MessagesServiceImpl) MessagesGetUnreadMentions

func (s *MessagesServiceImpl) MessagesGetUnreadMentions(ctx context.Context, request *mtproto.TLMessagesGetUnreadMentions) (*mtproto.Messages_Messages, error)

messages.getUnreadMentions#46578472 peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;

func (*MessagesServiceImpl) MessagesGetWebPage

func (s *MessagesServiceImpl) MessagesGetWebPage(ctx context.Context, request *mtproto.TLMessagesGetWebPage) (*mtproto.WebPage, error)

messages.getWebPage#32ca8f91 url:string hash:int = WebPage;

func (*MessagesServiceImpl) MessagesGetWebPagePreview

func (s *MessagesServiceImpl) MessagesGetWebPagePreview(ctx context.Context, request *mtproto.TLMessagesGetWebPagePreview) (*mtproto.MessageMedia, error)

messages.getWebPagePreview#25223e24 message:string = MessageMedia;

func (*MessagesServiceImpl) MessagesHideReportSpam

func (s *MessagesServiceImpl) MessagesHideReportSpam(ctx context.Context, request *mtproto.TLMessagesHideReportSpam) (*mtproto.Bool, error)

messages.hideReportSpam#a8f1709b peer:InputPeer = Bool;

func (*MessagesServiceImpl) MessagesImportChatInvite

func (s *MessagesServiceImpl) MessagesImportChatInvite(ctx context.Context, request *mtproto.TLMessagesImportChatInvite) (*mtproto.Updates, error)

messages.importChatInvite#6c50051c hash:string = Updates;

func (*MessagesServiceImpl) MessagesInstallStickerSet

messages.installStickerSet#c78fe460 stickerset:InputStickerSet archived:Bool = messages.StickerSetInstallResult;

func (*MessagesServiceImpl) MessagesMigrateChat

func (s *MessagesServiceImpl) MessagesMigrateChat(ctx context.Context, request *mtproto.TLMessagesMigrateChat) (*mtproto.Updates, error)

messages.migrateChat#15a3b8e3 chat_id:int = Updates;

func (*MessagesServiceImpl) MessagesReadEncryptedHistory

func (s *MessagesServiceImpl) MessagesReadEncryptedHistory(ctx context.Context, request *mtproto.TLMessagesReadEncryptedHistory) (*mtproto.Bool, error)

messages.readEncryptedHistory#7f4b690a peer:InputEncryptedChat max_date:int = Bool;

func (*MessagesServiceImpl) MessagesReadFeaturedStickers

func (s *MessagesServiceImpl) MessagesReadFeaturedStickers(ctx context.Context, request *mtproto.TLMessagesReadFeaturedStickers) (*mtproto.Bool, error)

messages.readFeaturedStickers#5b118126 id:Vector<long> = Bool;

func (*MessagesServiceImpl) MessagesReadHistory

messages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages;

func (*MessagesServiceImpl) MessagesReadHistoryLayer2

messages.readHistory#b04f2510 peer:InputPeer max_id:int offset:int = messages.AffectedHistory;

func (*MessagesServiceImpl) MessagesReadMentions

messages.readMentions#f0189d3 peer:InputPeer = messages.AffectedHistory;

func (*MessagesServiceImpl) MessagesReadMessageContents

messages.readMessageContents#36a73f77 id:Vector<int> = messages.AffectedMessages;

func (*MessagesServiceImpl) MessagesReceivedMessages

messages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>;

func (*MessagesServiceImpl) MessagesReceivedQueue

func (s *MessagesServiceImpl) MessagesReceivedQueue(ctx context.Context, request *mtproto.TLMessagesReceivedQueue) (*mtproto.VectorLong, error)

messages.receivedQueue#55a5bb66 max_qts:int = Vector<long>;

func (*MessagesServiceImpl) MessagesReorderPinnedDialogs

func (s *MessagesServiceImpl) MessagesReorderPinnedDialogs(ctx context.Context, request *mtproto.TLMessagesReorderPinnedDialogs) (*mtproto.Bool, error)

messages.reorderPinnedDialogs#959ff644 flags:# force:flags.0?true order:Vector<InputPeer> = Bool;

func (*MessagesServiceImpl) MessagesReorderStickerSets

func (s *MessagesServiceImpl) MessagesReorderStickerSets(ctx context.Context, request *mtproto.TLMessagesReorderStickerSets) (*mtproto.Bool, error)

messages.reorderStickerSets#78337739 flags:# masks:flags.0?true order:Vector<long> = Bool;

func (*MessagesServiceImpl) MessagesReportEncryptedSpam

func (s *MessagesServiceImpl) MessagesReportEncryptedSpam(ctx context.Context, request *mtproto.TLMessagesReportEncryptedSpam) (*mtproto.Bool, error)

messages.reportEncryptedSpam#4b0c8c0f peer:InputEncryptedChat = Bool;

func (*MessagesServiceImpl) MessagesReportSpam

func (s *MessagesServiceImpl) MessagesReportSpam(ctx context.Context, request *mtproto.TLMessagesReportSpam) (*mtproto.Bool, error)

messages.reportSpam#cf1592db peer:InputPeer = Bool;

func (*MessagesServiceImpl) MessagesRequestEncryption

func (s *MessagesServiceImpl) MessagesRequestEncryption(ctx context.Context, request *mtproto.TLMessagesRequestEncryption) (*mtproto.EncryptedChat, error)

messages.requestEncryption#f64daf43 user_id:InputUser random_id:int g_a:bytes = EncryptedChat;

func (*MessagesServiceImpl) MessagesSaveDraft

func (s *MessagesServiceImpl) MessagesSaveDraft(ctx context.Context, request *mtproto.TLMessagesSaveDraft) (*mtproto.Bool, error)

messages.saveDraft#bc39e14b flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> = Bool;

func (*MessagesServiceImpl) MessagesSaveGif

func (s *MessagesServiceImpl) MessagesSaveGif(ctx context.Context, request *mtproto.TLMessagesSaveGif) (*mtproto.Bool, error)

messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool;

func (*MessagesServiceImpl) MessagesSaveRecentSticker

func (s *MessagesServiceImpl) MessagesSaveRecentSticker(ctx context.Context, request *mtproto.TLMessagesSaveRecentSticker) (*mtproto.Bool, error)

messages.saveRecentSticker#392718f8 flags:# attached:flags.0?true id:InputDocument unsave:Bool = Bool;

func (*MessagesServiceImpl) MessagesSearch

messages.search#39e9ea0 flags:# peer:InputPeer q:string from_id:flags.0?InputUser filter:MessagesFilter min_date:int max_date:int offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;

func (*MessagesServiceImpl) MessagesSearchGifs

messages.searchGifs#bf9a776b q:string offset:int = messages.FoundGifs;

func (*MessagesServiceImpl) MessagesSearchGlobal

messages.searchGlobal#9e3cacb0 q:string offset_date:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;

func (*MessagesServiceImpl) MessagesSearchLayer68

messages.search#f288a275 flags:# peer:InputPeer q:string from_id:flags.0?InputUser filter:MessagesFilter min_date:int max_date:int offset:int max_id:int limit:int = messages.Messages;

func (*MessagesServiceImpl) MessagesSendEncrypted

messages.sendEncrypted#a9776773 peer:InputEncryptedChat random_id:long data:bytes = messages.SentEncryptedMessage;

func (*MessagesServiceImpl) MessagesSendEncryptedFile

messages.sendEncryptedFile#9a901b66 peer:InputEncryptedChat random_id:long data:bytes file:InputEncryptedFile = messages.SentEncryptedMessage;

func (*MessagesServiceImpl) MessagesSendEncryptedService

messages.sendEncryptedService#32d439a4 peer:InputEncryptedChat random_id:long data:bytes = messages.SentEncryptedMessage;

func (*MessagesServiceImpl) MessagesSendInlineBotResult

func (s *MessagesServiceImpl) MessagesSendInlineBotResult(ctx context.Context, request *mtproto.TLMessagesSendInlineBotResult) (*mtproto.Updates, error)

messages.sendInlineBotResult#b16e06fe flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int random_id:long query_id:long id:string = Updates;

func (*MessagesServiceImpl) MessagesSendMedia

func (s *MessagesServiceImpl) MessagesSendMedia(ctx context.Context, request *mtproto.TLMessagesSendMedia) (*mtproto.Updates, error)

messages.sendMedia#c8f16791 flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia random_id:long reply_markup:flags.2?ReplyMarkup = Updates;

func (*MessagesServiceImpl) MessagesSendMessage

func (s *MessagesServiceImpl) MessagesSendMessage(ctx context.Context, request *mtproto.TLMessagesSendMessage) (*mtproto.Updates, error)

流程:

  1. 入库: 1)存消息数据,2)分别存到发件箱和收件箱里
  2. 离线推送
  3. 在线推送

messages.sendMessage#fa88427a flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> = Updates;

func (*MessagesServiceImpl) MessagesSendMultiMedia

func (s *MessagesServiceImpl) MessagesSendMultiMedia(ctx context.Context, request *mtproto.TLMessagesSendMultiMedia) (*mtproto.Updates, error)

messages.sendMultiMedia#2095512f flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int multi_media:Vector<InputSingleMedia> = Updates;

func (*MessagesServiceImpl) MessagesSendScreenshotNotification

func (s *MessagesServiceImpl) MessagesSendScreenshotNotification(ctx context.Context, request *mtproto.TLMessagesSendScreenshotNotification) (*mtproto.Updates, error)

messages.sendScreenshotNotification#c97df020 peer:InputPeer reply_to_msg_id:int random_id:long = Updates;

func (*MessagesServiceImpl) MessagesSetBotCallbackAnswer

func (s *MessagesServiceImpl) MessagesSetBotCallbackAnswer(ctx context.Context, request *mtproto.TLMessagesSetBotCallbackAnswer) (*mtproto.Bool, error)

messages.setBotCallbackAnswer#d58f130a flags:# alert:flags.1?true query_id:long message:flags.0?string url:flags.2?string cache_time:int = Bool;

func (*MessagesServiceImpl) MessagesSetBotPrecheckoutResults

func (s *MessagesServiceImpl) MessagesSetBotPrecheckoutResults(ctx context.Context, request *mtproto.TLMessagesSetBotPrecheckoutResults) (*mtproto.Bool, error)

messages.setBotPrecheckoutResults#9c2dd95 flags:# success:flags.1?true query_id:long error:flags.0?string = Bool;

func (*MessagesServiceImpl) MessagesSetBotShippingResults

func (s *MessagesServiceImpl) MessagesSetBotShippingResults(ctx context.Context, request *mtproto.TLMessagesSetBotShippingResults) (*mtproto.Bool, error)

messages.setBotShippingResults#e5f672fa flags:# query_id:long error:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = Bool;

func (*MessagesServiceImpl) MessagesSetEncryptedTyping

func (s *MessagesServiceImpl) MessagesSetEncryptedTyping(ctx context.Context, request *mtproto.TLMessagesSetEncryptedTyping) (*mtproto.Bool, error)

messages.setEncryptedTyping#791451ed peer:InputEncryptedChat typing:Bool = Bool;

func (*MessagesServiceImpl) MessagesSetGameScore

func (s *MessagesServiceImpl) MessagesSetGameScore(ctx context.Context, request *mtproto.TLMessagesSetGameScore) (*mtproto.Updates, error)

messages.setGameScore#8ef8ecc0 flags:# edit_message:flags.0?true force:flags.1?true peer:InputPeer id:int user_id:InputUser score:int = Updates;

func (*MessagesServiceImpl) MessagesSetInlineBotResults

func (s *MessagesServiceImpl) MessagesSetInlineBotResults(ctx context.Context, request *mtproto.TLMessagesSetInlineBotResults) (*mtproto.Bool, error)

messages.setInlineBotResults#eb5ea206 flags:# gallery:flags.0?true private:flags.1?true query_id:long results:Vector<InputBotInlineResult> cache_time:int next_offset:flags.2?string switch_pm:flags.3?InlineBotSwitchPM = Bool;

func (*MessagesServiceImpl) MessagesSetInlineGameScore

func (s *MessagesServiceImpl) MessagesSetInlineGameScore(ctx context.Context, request *mtproto.TLMessagesSetInlineGameScore) (*mtproto.Bool, error)

messages.setInlineGameScore#15ad9f64 flags:# edit_message:flags.0?true force:flags.1?true id:InputBotInlineMessageID user_id:InputUser score:int = Bool;

func (*MessagesServiceImpl) MessagesSetTyping

func (s *MessagesServiceImpl) MessagesSetTyping(ctx context.Context, request *mtproto.TLMessagesSetTyping) (*mtproto.Bool, error)

messages.setTyping#a3825e50 peer:InputPeer action:SendMessageAction = Bool;

func (*MessagesServiceImpl) MessagesStartBot

func (s *MessagesServiceImpl) MessagesStartBot(ctx context.Context, request *mtproto.TLMessagesStartBot) (*mtproto.Updates, error)

messages.startBot#e6df7378 bot:InputUser peer:InputPeer random_id:long start_param:string = Updates;

func (*MessagesServiceImpl) MessagesToggleChatAdmins

func (s *MessagesServiceImpl) MessagesToggleChatAdmins(ctx context.Context, request *mtproto.TLMessagesToggleChatAdmins) (*mtproto.Updates, error)

messages.toggleChatAdmins#ec8bd9e1 chat_id:int enabled:Bool = Updates;

func (*MessagesServiceImpl) MessagesToggleDialogPin

func (s *MessagesServiceImpl) MessagesToggleDialogPin(ctx context.Context, request *mtproto.TLMessagesToggleDialogPin) (*mtproto.Bool, error)

messages.toggleDialogPin#3289be6a flags:# pinned:flags.0?true peer:InputPeer = Bool;

func (*MessagesServiceImpl) MessagesUninstallStickerSet

func (s *MessagesServiceImpl) MessagesUninstallStickerSet(ctx context.Context, request *mtproto.TLMessagesUninstallStickerSet) (*mtproto.Bool, error)

messages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool;

func (*MessagesServiceImpl) MessagesUploadEncryptedFile

func (s *MessagesServiceImpl) MessagesUploadEncryptedFile(ctx context.Context, request *mtproto.TLMessagesUploadEncryptedFile) (*mtproto.EncryptedFile, error)

messages.uploadEncryptedFile#5057c497 peer:InputEncryptedChat file:InputEncryptedFile = EncryptedFile;

func (*MessagesServiceImpl) MessagesUploadMedia

func (s *MessagesServiceImpl) MessagesUploadMedia(ctx context.Context, request *mtproto.TLMessagesUploadMedia) (*mtproto.MessageMedia, error)

messages.uploadMedia#519bc2b1 peer:InputPeer media:InputMedia = MessageMedia;

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL