change device name

This commit is contained in:
zhaoYangguang 2020-11-27 11:10:19 +08:00
parent 2f429259bd
commit 5bf0838329
4 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@ func (user *User) updateCommunityProfile() {
Name string `json:"name"`
AvatarURL string `json:"avatar_url"`
ShortDescription string `json:"short_description"`
}{"WhatsApp", user.bridge.Config.AppService.Bot.Avatar, "Your WhatsApp bridged chats"}
}{"Skype", user.bridge.Config.AppService.Bot.Avatar, "Your Skype bridged chats"}
_, err := user.bridge.Bot.MakeRequest(http.MethodPost, url, &profileReq, nil)
if err != nil {
user.log.Warnfln("Failed to update metadata of %s: %v", user.CommunityID, err)

View File

@ -138,7 +138,7 @@ func (helper *CryptoHelper) loginBot() (*mautrix.Client, error) {
Type: mautrix.AuthTypeAppservice,
Identifier: mautrix.UserIdentifier{Type: mautrix.IdentifierTypeUser, User: string(helper.bridge.AS.BotMXID())},
DeviceID: deviceID,
InitialDeviceDisplayName: "WhatsApp Bridge",
InitialDeviceDisplayName: "Skype Bridge",
StoreCredentials: true,
})
if err != nil {
@ -166,7 +166,7 @@ func (helper *CryptoHelper) loginBotOld() (*mautrix.Client, error) {
Identifier: mautrix.UserIdentifier{Type: mautrix.IdentifierTypeUser, User: string(helper.bridge.AS.BotMXID())},
Password: hex.EncodeToString(mac.Sum(nil)),
DeviceID: deviceID,
InitialDeviceDisplayName: "WhatsApp Bridge",
InitialDeviceDisplayName: "Skype Bridge",
StoreCredentials: true,
})
if err != nil {

View File

@ -51,8 +51,8 @@ func (puppet *Puppet) loginWithSharedSecret(mxid id.UserID) (string, error) {
Type: "m.login.password",
Identifier: mautrix.UserIdentifier{Type: "m.id.user", User: string(mxid)},
Password: hex.EncodeToString(mac.Sum(nil)),
DeviceID: "WhatsApp Bridge",
InitialDeviceDisplayName: "WhatsApp Bridge",
DeviceID: "Skype Bridge",
InitialDeviceDisplayName: "Skype Bridge",
})
if err != nil {
return "", err

View File

@ -183,7 +183,7 @@ func (user *User) GetManagementRoom() id.RoomID {
return user.ManagementRoom
}
resp, err := user.bridge.Bot.CreateRoom(&mautrix.ReqCreateRoom{
Topic: "WhatsApp bridge notices",
Topic: "Skype bridge notices",
IsDirect: true,
})
if err != nil {