Skip to content

Commit

Permalink
update to version v3.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fanjiangwei7 committed Aug 6, 2024
1 parent 82abce6 commit 70be5a3
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 45 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

[蓝莺IM](https://www.lanyingim.com/),是由美信拓扑团队研发的新一代即时通讯云服务,SDK设计简单集成方便,服务采用云原生技术和多云架构,私有云也可按月付费。

### v3.2.3 20240806
1.修复群组内只能看到自己的消息看不到其他人发送消息的问题。
2.修改群组内@消息列表的处理逻辑,@列表展示用户名支持群内隐藏消息,@消息内容同步支持使用群隐藏用户名。
3.群组内对于群隐藏用户,即没有设置群昵称及个人昵称的用户。自己的用户名也展示为隐藏用户名。
4.修复群组内已读消息处理后展示的未读数清除很慢的问题。

### v3.2.2 20240806
1.移除用户设置别名相关的展示机操作接口,针对联系人只保留昵称、用户名和 id信息。
2.更新选择切换按钮的样式。
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@
"all": "node .electron-vue/build.js && electron-builder",
"w": "node .electron-vue/build.js"
},
"version": "3.2.2"
"version": "3.2.3"
}
2 changes: 1 addition & 1 deletion src/renderer/im/floo-3.0.0.js

Large diffs are not rendered by default.

70 changes: 52 additions & 18 deletions src/renderer/ui/chatting/content/group/inputer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="mentionList" v-if="this.filteredMentionRosters.length > 0">
<div :key="roster.user_id" @click="clickMemberListHander(roster.user_id)" class="mentionItem" v-for="roster in this.filteredMentionRosters">
<img :src="rImage(roster.avatar)" class="avatar" />
<span class="name">{{ roster.display_name }}</span>
<span class="name">{{ displayName(roster) }}</span>
</div>
</div>
<input @change="fileChangeHandler" ref="fileRef" type="file" />
Expand All @@ -21,6 +21,7 @@

<script>
import { mapGetters } from 'vuex';
import CryptoJS from 'crypto-js';
export default {
name: 'rosterInputer',
Expand All @@ -38,7 +39,7 @@ export default {
},
components: {},
computed: {
...mapGetters('content', ['getSid', 'getMemberList']),
...mapGetters('content', ['getSid', 'getGroupInfo', 'getMemberList']),
im() {
return this.$store.state.im;
}
Expand All @@ -56,9 +57,6 @@ export default {
if (id === this.im.userManage.getUid()) {
that.hasBan = true;
that.expired_time = Date.now() + parseInt(content) * 60 * 1000;
console.log('SSSS onGroupBaned work here.');
console.log('SSSS onGroupBaned that.expired_time : ' + that.expired_time);
console.log('SSSS onGroupBaned Date.now() : ' + Date.now());
that.startBanCheck();
}
});
Expand Down Expand Up @@ -119,15 +117,20 @@ export default {
filterMemberList(str) {
let ret = [];
if (!str) {
ret = [].concat(this.getMemberList);
ret = [].concat(
this.getMemberList.filter((x) => {
return x.user_id != this.im.userManage.getUid();
})
);
} else {
let that = this;
ret = this.getMemberList.filter((x) => {
return x.display_name.indexOf(str) >= 0;
if (x.user_id != that.im.userManage.getUid()) {
return x.display_name.indexOf(str) >= 0;
}
});
}
this.filteredMentionRosters = [].concat(ret);
console.log('filterMemberList');
console.log(this.filteredMentionRosters);
},
rImage(avatar) {
return this.im.sysManage.getImage({
Expand All @@ -148,7 +151,7 @@ export default {
} else {
const marr = mention.split('@');
const nickName = marr[marr.length - 1];
const rosters = this.getMemberList.filter((x) => x.display_name === nickName);
const rosters = this.getMemberList.filter((x) => this.displayName(x) === nickName);
if (!rosters || rosters.length <= 0) {
retStr += mention + ' ';
} else {
Expand Down Expand Up @@ -281,7 +284,7 @@ export default {
this.mentionSelectedUids = [].concat(arr);
const roster = this.getMemberList.find((x) => x.user_id + '' === uid + '');
const sarr = (this.message.split && this.message.split('@')) || [];
sarr[sarr.length - 1] = roster.display_name;
sarr[sarr.length - 1] = this.displayName(roster);
this.message = sarr.join('@') + ' ';
this.textKeyUp();
}
Expand All @@ -294,9 +297,6 @@ export default {
if (item.user_id === this.im.userManage.getUid() && item.expired_time > Date.now()) {
that.hasBan = true;
that.expired_time = item.expired_time;
console.log('SSSS chechBan work here.');
console.log('SSSS chechBan expired_time :' + item.expired_time);
console.log('SSSS chechBan Date.now() : ' + Date.now());
that.startBanCheck();
}
});
Expand All @@ -306,9 +306,6 @@ export default {
startBanCheck() {
this.banCheckTimer = setInterval(() => {
console.log('SSSS banCheckTimer timer work here.');
console.log('SSSS banCheckTimer expired_time : ' + this.expired_time);
console.log('SSSS banCheckTimer Date.now() : ' + Date.now());
if (this.expired_time > Date.now()) {
// do nothing.
} else {
Expand All @@ -318,10 +315,47 @@ export default {
},
stopBanCheck() {
console.log('SSSS banCheckTimer timer stop here.');
clearInterval(this.banCheckTimer);
this.banCheckTimer = null;
this.hasBan = false;
},
checkHideMemberInfo(user_id) {
let hide = true;
let hide_member_info = this.getGroupInfo.hide_member_info;
let app_hide_member_info = false;
const uid = this.im.userManage.getUid();
let appConfig = this.im.sysManage.getAppConfig(this.im.userManage.getAppid());
if (appConfig) {
app_hide_member_info = appConfig.hide_member_info;
}
if (app_hide_member_info) {
if (!hide_member_info) {
hide = false;
}
} else {
hide = false;
}
return hide;
},
calucateHideMemberName(roster) {
let original = roster.display_name + roster.user_id;
const md5hash = CryptoJS.MD5(original);
let output = md5hash.toString(CryptoJS.enc.Base64);
if (output.length > 12) {
output = output.substring(0, 12);
}
return output;
},
displayName(roster) {
if (this.checkHideMemberInfo(roster.user_id) && !roster.has_nick) {
return this.calucateHideMemberName(roster);
} else {
return roster.display_name;
}
}
//methods finish
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ui/chatting/content/group/memberList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default {
app_hide_member_info = appConfig.hide_member_info;
}
if (app_hide_member_info) {
if (uid === user_id || !hide_member_info) {
if (!hide_member_info) {
hide = false;
}
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/ui/chatting/content/group/renderMsg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -612,13 +612,12 @@ export default {
let hide = true;
let hide_member_info = this.getGroupInfo.hide_member_info;
let app_hide_member_info = false;
const uid = this.im.userManage.getUid();
let appConfig = this.im.sysManage.getAppConfig(this.im.userManage.getAppid());
if (appConfig) {
app_hide_member_info = appConfig.hide_member_info;
}
if (app_hide_member_info) {
if (uid === user_id || !hide_member_info) {
if (!hide_member_info) {
hide = false;
}
} else {
Expand Down
65 changes: 46 additions & 19 deletions src/renderer/ui/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export default {
sdkok: false,
intent: {},
autoSkip: true,
officialUser: false
officialUser: false,
linkChangeAccount: false
};
},
mounted() {
Expand Down Expand Up @@ -233,21 +234,32 @@ export default {
that.$store.dispatch('login/actionChangeLoginStatus', true);
if (that.intent.action === 'support') {
if (that.intent.linkMode === 'lanying-support') {
if (that.checkMobile()) {
that.$store.dispatch('login/actionChangeAppStatus', 'minimize');
parent.postMessage(
JSON.stringify({
type: 'lanying_toggle_chat',
size: 'minimize'
}),
'*'
);
if (!that.linkChangeAccount) {
if (that.checkMobile()) {
that.$store.dispatch('login/actionChangeAppStatus', 'minimize');
parent.postMessage(
JSON.stringify({
type: 'lanying_toggle_chat',
size: 'minimize'
}),
'*'
);
} else {
that.$store.dispatch('login/actionChangeAppStatus', 'navigation');
parent.postMessage(
JSON.stringify({
type: 'lanying_toggle_chat',
size: 'navigation'
}),
'*'
);
}
} else {
that.$store.dispatch('login/actionChangeAppStatus', 'navigation');
that.$store.dispatch('login/actionChangeAppStatus', 'support');
parent.postMessage(
JSON.stringify({
type: 'lanying_toggle_chat',
size: 'navigation'
size: 'large'
}),
'*'
);
Expand Down Expand Up @@ -306,13 +318,20 @@ export default {
}, autoLoginTimes * AUTO_LOGIN_DELAY);
autoLoginTimes++;
} else {
console.log('自动登录失败次数过多,请手工登录。');
autoLoginTimes = 0;
setTimeout(() => {
that.alert('自动登录失败次数过多,请重新手工登录');
}, 500);
if (!that.linkChangeAccount) {
console.log('自动登录失败次数过多,请手工登录。');
setTimeout(() => {
that.alert('自动登录失败次数过多,请重新手工登录');
}, 500);
}
if (that.intent.action === 'support') {
that.imLogout(true);
if (that.linkChangeAccount) {
setTimeout(() => {
that.imLogin();
}, 500);
}
} else {
that.imLogout();
}
Expand Down Expand Up @@ -493,7 +512,8 @@ export default {
},
info.app_id
);
this.$store.dispatch('actionChangeAppID', info.app_id);
//this.$store.dispatch('actionChangeAppID', info.app_id);
this.imLogin();
},
imLogout(linkLogin = false, quitAllWeb = false) {
Expand All @@ -502,9 +522,16 @@ export default {
currentUrl.search = '';
window.history.replaceState({}, document.title, currentUrl.toString());
}
this.getIM().logout({ quitAllWeb });
this.getIM().logout({ quitAllWeb, linkLogin });
this.removeLoginInfo();
this.$store.dispatch('login/actionChangeAppStatus', 'login');
if (!linkLogin) {
this.$store.dispatch('login/actionChangeAppStatus', 'login');
} else {
this.linkChangeAccount = true;
this.$store.dispatch('layer/actionSetShowing', '');
this.$store.dispatch('layer/actionSetShowmask', false);
this.$store.dispatch('login/actionChangeAppStatus', 'loading');
}
},
isIMLogin() {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ui/layers/groupsetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ export default {
app_hide_member_info = appConfig.hide_member_info;
}
if (app_hide_member_info) {
if (uid === user_id || !hide_member_info) {
if (!hide_member_info) {
hide = false;
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/ui/store/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const actions = {
actionOpenGroup(context) {
const { rootState, state } = context;
rootState.im.groupManage.openGroup(state.sid);
rootState.im.groupManage.readGroupMessage(state.sid);
//rootState.im.groupManage.readGroupMessage(state.sid);

rootState.im.groupManage
.asyncGetAdminList({ group_id: state.sid })
Expand All @@ -163,7 +163,7 @@ const actions = {
actionPreOpenGroup(context, x) {
const { rootState } = context;
rootState.im.groupManage.openGroup(x.sid);
rootState.im.groupManage.readGroupMessage(x.sid);
//rootState.im.groupManage.readGroupMessage(x.sid);

rootState.im.groupManage
.asyncGetAdminList({ group_id: x.sid })
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/ui/support/header/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,9 @@ export default {
font-weight: bold;
line-height: 24px;
color: black;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.profile-bio {
Expand Down

0 comments on commit 70be5a3

Please sign in to comment.