webserver

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearError added in v0.8.0

func ClearError()

func MessageHandler

func MessageHandler(msg *store.Message)

func RandStringBytesMaskImprSrcUnsafe added in v0.8.0

func RandStringBytesMaskImprSrcUnsafe(n int) string

func RegistrationDone

func RegistrationDone()

RegistrationDone sets restration status to done and sends registration status to axoltol-web

func RequestInput

func RequestInput(request string) string

func Run

func Run() error

Run runs the webserver and the websocket

func SetGui added in v0.6.15

func SetGui()

SetGui sets the gui

func SetUiDarkMode added in v0.8.0

func SetUiDarkMode()

func ShowError

func ShowError(errorMessage string)

func UpdateActiveChat added in v0.8.0

func UpdateActiveChat()

UpdateActiveChat checks if there is an active chat an if yes it updates it on axolotl web

func UpdateChatList

func UpdateChatList()

UpdateChatList updates the chatlist if not entered a chat + registered

func UpdateContactList added in v0.6.8

func UpdateContactList()

UpdateContactList updates the contactlist if not entered a chat + registered

func UpdateMessageHandler added in v0.9.0

func UpdateMessageHandler(msg *store.Message)

UpdateMessageHandler sents message receipts to all connected clients for the activeChat

func UpdateMessageHandlerWithSource added in v0.9.0

func UpdateMessageHandlerWithSource(msg *store.Message)

UpdateMessageHandlerWithSource checks if the message belongs to the current chat and if yes triggers an update on axolotl web

Types

type AddContactMessage

type AddContactMessage struct {
	Type  string `json:"request"`
	Name  string `json:"name"`
	Phone string `json:"phone"`
}

type AddDeviceMessage

type AddDeviceMessage struct {
	Type string `json:"request"`
	Url  string `json:"url"`
}

type ChatListEnvelope

type ChatListEnvelope struct {
	ChatList []*store.Session
}

type ConfigEnvelope added in v0.6.15

type ConfigEnvelope struct {
	Type             string
	Version          string
	RegisteredNumber string
	Name             string
	Notifications    bool
	Encryption       bool
	Gui              string
}

type ContactListEnvelope

type ContactListEnvelope struct {
	ContactList []textsecureContacts.Contact
}

type CreateChatMessage added in v0.6.7

type CreateChatMessage struct {
	Type string `json:"request"`
	UUID string `json:"uuid"`
}

type CreateGroupMessage added in v0.6.8

type CreateGroupMessage struct {
	Type    string   `json:"request"`
	Name    string   `json:"name"`
	Members []string `json:"members"`
}

type CurrentChatEnvelope added in v0.6.15

type CurrentChatEnvelope struct {
	OpenChat *OpenChat
}

type DelChatMessage added in v0.6.3

type DelChatMessage struct {
	Type string `json:"request"`
	ID   int64  `json:"id"`
}

type DelContactMessage added in v0.6.4

type DelContactMessage struct {
	Type string `json:"request"`
	ID   string `json:"id"`
}

type DelDeviceMessage

type DelDeviceMessage struct {
	Type string `json:"request"`
	Id   int    `json:"id"`
}

type DelMessageMessage added in v0.9.9

type DelMessageMessage struct {
	Type string `json:"request"`
	ID   int64  `json:"id"`
}

type DeviceListEnvelope

type DeviceListEnvelope struct {
	DeviceList []textsecure.DeviceInfo
}

type EditContactMessage added in v0.6.4

type EditContactMessage struct {
	Type  string `json:"request"`
	Name  string `json:"name"`
	Phone string `json:"phone"`
	ID    int    `json:"id"`
}

type GetMessageListMessage

type GetMessageListMessage struct {
	Type string `json:"request"`
	ID   int64  `json:"id"`
}

type GetMoreMessages

type GetMoreMessages struct {
	Type   string `json:"request"`
	LastID string `json:"lastId"`
}

type IdentityEnvelope added in v0.6.15

type IdentityEnvelope struct {
	FingerprintNumbers []string
	FingerprintQRCode  []int
}

type Message

type Message struct {
	Type string                 `json:"request"`
	Data map[string]interface{} `json:"-"` // Rest of the fields should go here.
}

type MessageListEnvelope

type MessageListEnvelope struct {
	MessageList *store.MessageList
}

type MessageRecieved

type MessageRecieved struct {
	MessageRecieved *store.Message
}

type MoreMessageListEnvelope

type MoreMessageListEnvelope struct {
	MoreMessageList *store.MessageList
}

type OpenChat added in v0.7.5

type OpenChat struct {
	CurrentChat *store.Session
	Contact     *textsecureContacts.Contact
	Group       *textsecure.Group
}

type OpenChatMessage added in v0.7.5

type OpenChatMessage struct {
	Type string `json:"request"`
	Id   int64  `json:"id"`
}

type RefreshContactsMessage

type RefreshContactsMessage struct {
	Type string `json:"request"`
	Url  string `json:"url"`
}

type RequestCodeMessage

type RequestCodeMessage struct {
	Type string `json:"request"`
	Tel  string `json:"tel"`
}

type ResetEncryptionMessage added in v0.6.15

type ResetEncryptionMessage struct {
	Type string `json:"request"`
	Chat int64  `json:"chat"`
}

type SendAttachmentMessage added in v0.6.15

type SendAttachmentMessage struct {
	Type    string `json:"request"`
	AType   string `json:"type"`
	Path    string `json:"path"`
	To      int64  `json:"to"`
	Message string `json:"message"`
}

type SendCaptchaTokenMessage added in v0.9.7

type SendCaptchaTokenMessage struct {
	Type  string `json:"request"`
	Token string `json:"token"`
}

type SendCodeMessage

type SendCodeMessage struct {
	Type string `json:"request"`
	Code string `json:"code"`
}

type SendEnterChatRequest added in v0.6.8

type SendEnterChatRequest struct {
	Type string
	Chat int64
}

type SendError

type SendError struct {
	Type  string
	Error string
}

type SendGui added in v0.6.15

type SendGui struct {
	Gui string
}

SendGui sends to axolotl the gui to trigger ubuntu touch specific parts

type SendMessageMessage

type SendMessageMessage struct {
	Type    string `json:"request"`
	To      int64  `json:"to"`
	Message string `json:"message"`
}

type SendPasswordMessage added in v0.6.15

type SendPasswordMessage struct {
	Type string `json:"request"`
	Pw   string `json:"pw"`
}

type SendPinMessage added in v0.8.0

type SendPinMessage struct {
	Type string `json:"request"`
	Pin  string `json:"pin"`
}

type SendRequest

type SendRequest struct {
	Type string
}

type SendUsernameMessage added in v1.0.0

type SendUsernameMessage struct {
	Type     string `json:"request"`
	Username string `json:"username"`
}

type SetDarkMode added in v0.8.0

type SetDarkMode struct {
	Type     string `json:"request"`
	DarkMode bool   `json:"darkMode"`
}

type SetPasswordMessage added in v0.6.15

type SetPasswordMessage struct {
	Type      string `json:"request"`
	Pw        string `json:"pw"`
	CurrentPw string `json:"CurrentPw"`
}

type UpdateCurrentChat added in v0.8.0

type UpdateCurrentChat struct {
	CurrentChat *store.Session
	Contact     *textsecureContacts.Contact
	Group       *textsecure.Group
}

type UpdateCurrentChatEnvelope added in v0.8.0

type UpdateCurrentChatEnvelope struct {
	UpdateCurrentChat *UpdateCurrentChat
}

type UpdateGroupMessage added in v0.7.5

type UpdateGroupMessage struct {
	Type    string   `json:"request"`
	Name    string   `json:"name"`
	ID      string   `json:"id"`
	Members []string `json:"members"`
}

type UpdateMessage added in v0.9.0

type UpdateMessage struct {
	UpdateMessage *store.Message
}

type UploadAttachmentMessage added in v0.8.0

type UploadAttachmentMessage struct {
	Type       string `json:"request"`
	To         int64  `json:"to"`
	Attachment string `json:"attachment"`
	Message    string `json:"message"`
}

type UploadVcf added in v0.6.3

type UploadVcf struct {
	Type string `json:"request"`
	Vcf  string `json:"vcf"`
}

Jump to

Keyboard shortcuts

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