Add kick,ban,make admin and make moderator operations
This commit is contained in:
parent
e5bf7f4f0c
commit
11e544b1c5
23 changed files with 281 additions and 27 deletions
|
|
@ -22,6 +22,8 @@ import MessageOutgoingVideoExport from "./messages/export/MessageOutgoingVideoEx
|
|||
import ContactJoin from "./messages/ContactJoin.vue";
|
||||
import ContactLeave from "./messages/ContactLeave.vue";
|
||||
import ContactInvited from "./messages/ContactInvited.vue";
|
||||
import ContactKicked from "./messages/ContactKicked.vue";
|
||||
import ContactBanned from "./messages/ContactBanned.vue";
|
||||
import ContactChanged from "./messages/ContactChanged.vue";
|
||||
import RoomCreated from "./messages/RoomCreated.vue";
|
||||
import RoomAliased from "./messages/RoomAliased.vue";
|
||||
|
|
@ -66,6 +68,8 @@ export default {
|
|||
ContactJoin,
|
||||
ContactLeave,
|
||||
ContactInvited,
|
||||
ContactKicked,
|
||||
ContactBanned,
|
||||
ContactChanged,
|
||||
RoomCreated,
|
||||
RoomAliased,
|
||||
|
|
@ -123,9 +127,15 @@ export default {
|
|||
return ContactJoin;
|
||||
}
|
||||
} else if (event.getContent().membership == "leave") {
|
||||
if ((event.getPrevContent() || {}).membership == "join" &&
|
||||
event.getStateKey() != event.getSender()) {
|
||||
return ContactKicked;
|
||||
}
|
||||
return ContactLeave;
|
||||
} else if (event.getContent().membership == "invite") {
|
||||
return ContactInvited;
|
||||
} else if (event.getContent().membership == "ban") {
|
||||
return ContactBanned;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue