30 lines
1.1 KiB
Go
30 lines
1.1 KiB
Go
package model
|
|
|
|
// MessageWrapper is the canonical Cwtch overlay wrapper
|
|
type MessageWrapper struct {
|
|
Overlay int `json:"o"`
|
|
Data string `json:"d"`
|
|
}
|
|
|
|
// Overlay Identifiers now have a dual strucutre, their full id defines the overlay
|
|
// type, and thus the encoding of the Data.
|
|
// But the last 8 bits of the overlay now also encode the **channel* that the overlay is sent
|
|
// to. This is needed for Hybrid Groups where there exists both a main channel and the
|
|
// management channel (whose messages we don't want to show up in a default fetch).
|
|
// To support backwards compatibility, any overlay id less than 0x300 to resolve to 0
|
|
|
|
// OverlayChat is the canonical identifier for chat overlays
|
|
const OverlayChat = 1
|
|
|
|
// OverlayInviteContact is the canonical identifier for the contact invite overlay
|
|
const OverlayInviteContact = 100
|
|
|
|
// OverlayInviteGroup is the canonical identifier for the group invite overlay
|
|
const OverlayInviteGroup = 101
|
|
|
|
// OverlayFileSharing is the canonical identifier for the file sharing overlay
|
|
const OverlayFileSharing = 200
|
|
|
|
// ManageGroupEvent is the canonical identifier for the manage group overlay
|
|
const OverlayManageGroupEvent = 0x302
|