wxkind

package
v1.6.10 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package wxkind maps wechat raw integer codes to human-readable labels. Sources: observed WeChat 4.x schema + reverse-engineered electron services.

Index

Constants

This section is empty.

Variables

View Source
var AppSubtypeNames = map[int32]string{
	3:    "music",
	5:    "link",
	6:    "file",
	8:    "file",
	19:   "forward_chat",
	24:   "file",
	33:   "miniprogram",
	36:   "miniprogram",
	49:   "link",
	51:   "channel_video",
	53:   "solitaire",
	57:   "quote",
	62:   "pat",
	76:   "music",
	87:   "announcement",
	2000: "transfer",
	2001: "red_packet",
}

AppSubtypeNames maps the subtype of an app-message (base_kind=49) to a precise human-readable kind. Falls back to "app" when subtype is unknown.

View Source
var BaseKindNames = map[int32]string{
	1:     "text",
	3:     "image",
	34:    "voice",
	42:    "card",
	43:    "video",
	47:    "sticker",
	48:    "location",
	49:    "app",
	50:    "voip",
	10000: "system",
}

BaseKindNames maps wechat top-level message kind ints to a label. For base_kind=49 the subtype refines the meaning (see AppSubtypeNames).

View Source
var FavTypeNames = map[int64]string{
	1:  "text",
	2:  "image",
	3:  "voice",
	4:  "video",
	5:  "link",
	6:  "location",
	8:  "file",
	14: "chat_history",
	18: "miniprogram",
}

FavTypeNames maps wechat favorite kind ints to a human-readable label. Source: WeChat client schema (CDataItem types). Undocumented values (e.g. 20) fall through to "unknown".

Functions

func ClassifyUsername

func ClassifyUsername(u string) string

ClassifyUsername maps a raw username to a human-readable type by well-known patterns (suffix/prefix). Stable across schema changes since it depends only on the username string shape, not contact.local_type which varies by version.

func FavKind

func FavKind(t int64) string

FavKind resolves a favorite type_id to a human-readable label, or "unknown".

func Resolve

func Resolve(baseKind, subtype int32) string

Resolve returns the most specific human-readable label for (baseKind, subtype). For base_kind=49 it consults AppSubtypeNames first; otherwise BaseKindNames. Returns "unknown" if neither matches.

func Unpack

func Unpack(lt int64) (baseKind, subtype int32, name string)

Unpack splits a packed local_type int64 into (baseKind, subtype, name). local_type encoding: (subtype << 32) | baseKind.

Types

This section is empty.

Jump to

Keyboard shortcuts

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