Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion goneonize/defproto/.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ad09ee6c2a9f3dccf56740295a5adf855eca1369
aa3b6b47371cfa2d23db4f02188abfa235acb139
4 changes: 2 additions & 2 deletions goneonize/defproto/Neonize.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions goneonize/defproto/waE2E/WAWebProtobufsE2E.proto
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ message PaymentInviteMessage {

optional ServiceType serviceType = 1;
optional int64 expiryTimestamp = 2;
optional bool incentiveEligible = 3;
}

message HighlyStructuredMessage {
Expand Down Expand Up @@ -1117,6 +1118,8 @@ message ContextInfo {
}

optional AudienceType audienceType = 1;
optional string listName = 2;
optional string listEmoji = 3;
}

message DataSharingContext {
Expand Down Expand Up @@ -1569,6 +1572,7 @@ message Message {
optional NewsletterFollowerInviteMessage newsletterFollowerInviteMessageV2 = 113;
optional PollResultSnapshotMessage pollResultSnapshotMessageV3 = 115;
optional FutureProofMessage newsletterAdminProfileMessage = 116;
optional FutureProofMessage newsletterAdminProfileMessageV2 = 117;
}

message AlbumMessage {
Expand Down Expand Up @@ -2058,6 +2062,7 @@ message ContactMessage {
optional string displayName = 1;
optional string vcard = 16;
optional ContextInfo contextInfo = 17;
optional bool isSelfContact = 18;
}

message SenderKeyDistributionMessage {
Expand Down
23 changes: 23 additions & 0 deletions goneonize/defproto/waSyncAction/WAWebProtobufSyncAction.proto
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ message CallLogRecord {
}

message SettingsSyncAction {
enum MediaQualitySetting {
MEDIA_QUALITY_UNKNOWN = 0;
STANDARD = 1;
HD = 2;
}

enum DisplayMode {
DISPLAY_MODE_UNKNOWN = 0;
ALWAYS = 1;
Expand Down Expand Up @@ -176,6 +182,14 @@ message SettingsSyncAction {
IS_DOCUMENTS_AUTODOWNLOAD_ENABLED = 21;
DISABLE_LINK_PREVIEWS = 22;
NOTIFICATION_TONE_ID = 23;
MEDIA_UPLOAD_QUALITY = 24;
IS_SPELL_CHECK_ENABLED = 25;
IS_ENTER_TO_SEND_ENABLED = 26;
IS_GROUP_MESSAGE_NOTIFICATION_ENABLED = 27;
IS_GROUP_REACTIONS_NOTIFICATION_ENABLED = 28;
IS_STATUS_NOTIFICATION_ENABLED = 29;
STATUS_NOTIFICATION_TONE_ID = 30;
SHOULD_PLAY_SOUND_FOR_CALL_NOTIFICATION = 31;
}

enum SettingPlatform {
Expand Down Expand Up @@ -209,6 +223,14 @@ message SettingsSyncAction {
optional bool isDocumentsAutodownloadEnabled = 21;
optional bool disableLinkPreviews = 22;
optional int32 notificationToneID = 23;
optional MediaQualitySetting mediaUploadQuality = 24;
optional bool isSpellCheckEnabled = 25;
optional bool isEnterToSendEnabled = 26;
optional bool isGroupMessageNotificationEnabled = 27;
optional bool isGroupReactionsNotificationEnabled = 28;
optional bool isStatusNotificationEnabled = 29;
optional int32 statusNotificationToneID = 30;
optional bool shouldPlaySoundForCallNotification = 31;
}

message InteractiveMessageAction {
Expand Down Expand Up @@ -833,6 +855,7 @@ message MuteAction {
optional bool muted = 1;
optional int64 muteEndTimestamp = 2;
optional bool autoMuted = 3;
optional int64 muteEveryoneMentionEndTimestamp = 4;
}

message ContactAction {
Expand Down
14 changes: 14 additions & 0 deletions goneonize/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"go.mau.fi/whatsmeow/proto/waConsumerApplication"
waE2E "go.mau.fi/whatsmeow/proto/waE2E"
"go.mau.fi/whatsmeow/proto/waMsgApplication"
"go.mau.fi/whatsmeow/appstate"
"go.mau.fi/whatsmeow/store"
"go.mau.fi/whatsmeow/store/sqlstore"
"go.mau.fi/whatsmeow/types"
Expand Down Expand Up @@ -237,6 +238,19 @@ func GenerateWABinary(ctx context.Context, to types.JID, msg *waE2E.Message) *[]
return &nodes
}

//export SetPushName
func SetPushName(id *C.char, name *C.char) *C.char {
client, exists := clients[C.GoString(id)]
if !exists {
return C.CString("client not found")
}
err := client.SendAppState(context.Background(),appstate.BuildSettingPushName(C.GoString(name)))
if err != nil {
return C.CString(err.Error())
}
return C.CString("")
}

//export GetPNFromLID
func GetPNFromLID(id *C.char, JIDByte *C.uchar, JIDSize C.int) *C.struct_BytesReturn {
var neoJIDProto defproto.JID
Expand Down
2 changes: 1 addition & 1 deletion goneonize/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import "C"

//export GetVersion
func GetVersion() *C.char {
version := "0.3.12.post1"
version := "0.3.13"
return C.CString(version)
}
2 changes: 1 addition & 1 deletion neonize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
from .events import Event
from .utils.ffmpeg import FFmpeg
from .utils.iofile import TemporaryFile
__version__ = '0.3.12.post1'
__version__ = '0.3.13'
__all__ = ('NewClient', 'FFmpeg', 'TemporaryFile', 'Event')
2 changes: 2 additions & 0 deletions neonize/_binder.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ def get_bytes(self):
gocode.StopAll.restype = ctypes.c_void_p
gocode.FreeBytesStruct.argtypes = [ctypes.POINTER(Bytes)]
gocode.FreeBytesStruct.restype = None
gocode.SetPushName.argtypes = [ctypes.c_char_p, ctypes.c_char_p]
gocode.SetPushName.restype = ctypes.c_char_p
else:
gocode: Any = object()

Expand Down
11 changes: 11 additions & 0 deletions neonize/aioze/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2167,6 +2167,17 @@ async def set_profile_photo(self, file_or_bytes: typing.Union[str, bytes]) -> st
raise SetGroupPhotoError(model.Error)
return model.PictureID

async def set_profile_name(self, name: str) -> str:
"""
Set pushname on client side ( #source : https://github.com/tulir/whatsmeow/issues/374 )
:param name: Name
:type name: str
"""
err = (await self.__client.SetPushName(self.uuid, name.encode())).decode()

if err:
raise SendAppStateError(err)

async def get_lid_from_pn(self, jid: JID) -> JID:
"""Retrieves the matching lid from the supplied jid.

Expand Down
11 changes: 11 additions & 0 deletions neonize/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2132,6 +2132,17 @@ def set_profile_photo(self, file_or_bytes: typing.Union[str, bytes]) -> str:
raise SetGroupPhotoError(model.Error)
return model.PictureID

def set_profile_name(self, name: str) -> str:
"""
Set pushname on client side ( #source : https://github.com/tulir/whatsmeow/issues/374 )
:param name: Name
:type name: str
"""
err = self.__client.SetPushName(self.uuid, name.encode()).decode()

if err:
raise SendAppStateError(err)

def get_lid_from_pn(self, jid: JID) -> JID:
"""Retrieves the matching lid from the supplied jid.

Expand Down
2 changes: 1 addition & 1 deletion neonize/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import requests
from tqdm import tqdm
from .utils.platform import generated_name
__GONEONIZE_VERSION__ = '0.3.13.post0'
__GONEONIZE_VERSION__ = '0.3.13'
__GIT_RELEASE_URL__ = 'https://github.com/krypton-byte/neonize'

class UnsupportedPlatform(Exception):
Expand Down
657 changes: 323 additions & 334 deletions neonize/proto/Neonize_pb2.py

Large diffs are not rendered by default.

Loading